perl
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
cpan/Math-BigInt/t/Math/BigInt/Scalar.pm view on Meta::CPAN
###############################################################################
# core math lib for BigInt, representing big numbers by normal int/float's
# for testing only, will fail any bignum test if range is exceeded
package Math::BigInt::Scalar;
use 5.006;
use strict;
use warnings;
require Exporter;
our @ISA = qw(Exporter);
our $VERSION = '0.13';
##############################################################################
# global constants, flags and accessory
# constants for easier life
my $nan = 'NaN';
##############################################################################
# create objects from various representations
sub _new {
# create scalar ref from string
my $d = $_[1];
my $x = $d; # make copy
\$x;
}
sub _from_hex {
# not used
}
sub _from_oct {
# not used
}
sub _from_bin {
# not used
}
sub _zero {
my $x = 0; \$x;
}
sub _one {
my $x = 1; \$x;
}
sub _two {
my $x = 2; \$x;
}
sub _ten {
my $x = 10; \$x;
}
sub _copy {
my $x = $_[1];
my $z = $$x;
\$z;
}
# catch and throw away
sub import { }
##############################################################################
# convert back to string and number
sub _str {
# make string
"${$_[1]}";
}
sub _num {
# make a number
0+${$_[1]};
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.473 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )