use strict;
use warnings;
-use Math::BigInt::Calc;
+use Math::BigInt::Calc 0.56;
use vars qw/$VERSION $BASE $BASE_LEN/;
-$VERSION = '0.23';
+$VERSION = '0.24';
require XSLoader;
XSLoader::load(__PACKAGE__);
no strict 'refs';
*{'Math::BigInt::FastCalc::_' . $method} = \&{'Math::BigInt::Calc::_' . $method};
}
- my ($AND_BITS, $XOR_BITS, $OR_BITS, $BASE_LEN_SMALL, $MAX_VAL);
-
+
# store BASE_LEN and BASE to later pass it to XS code
- ($BASE_LEN, $AND_BITS, $XOR_BITS, $OR_BITS, $BASE_LEN_SMALL, $MAX_VAL, $BASE) =
- Math::BigInt::Calc::_base_len();
+ ($BASE_LEN, $BASE) = Math::BigInt::Calc::_base_len();
}
use Math::BigInt::FastCalc;
-my ($BASE_LEN, $AND_BITS, $XOR_BITS, $OR_BITS, $BASE_LEN_SMALL, $MAX_VAL) =
+my ($BASE_LEN, undef, $AND_BITS, $XOR_BITS, $OR_BITS, $BASE_LEN_SMALL, $MAX_VAL) =
Math::BigInt::FastCalc->_base_len();
print "# BASE_LEN = $BASE_LEN\n";
use strict;
# use warnings; # dont use warnings for older Perls
-our $VERSION = '0.55';
+our $VERSION = '0.56';
# Package to store unsigned big integers in decimal and do math with them
$BASE = int("1e".$BASE_LEN);
$MAX_VAL = $BASE-1;
return $BASE_LEN unless wantarray;
- return ($BASE_LEN, $AND_BITS, $XOR_BITS, $OR_BITS, $BASE_LEN, $MAX_VAL, $BASE);
+ return ($BASE_LEN, $BASE, $AND_BITS, $XOR_BITS, $OR_BITS, $BASE_LEN, $MAX_VAL,);
}
# find whether we can use mul or div in mul()/div()
}
}
return $BASE_LEN unless wantarray;
- return ($BASE_LEN, $AND_BITS, $XOR_BITS, $OR_BITS, $BASE_LEN, $MAX_VAL, $BASE);
+ return ($BASE_LEN, $BASE, $AND_BITS, $XOR_BITS, $OR_BITS, $BASE_LEN, $MAX_VAL);
}
sub _new
use Math::BigInt::Calc;
-my ($BASE_LEN, $AND_BITS, $XOR_BITS, $OR_BITS, $BASE_LEN_SMALL, $MAX_VAL) =
+my ($BASE_LEN, undef, $AND_BITS, $XOR_BITS, $OR_BITS, $BASE_LEN_SMALL, $MAX_VAL) =
Math::BigInt::Calc->_base_len();
print "# BASE_LEN = $BASE_LEN\n";
# construct a number with a zero-hole of BASE_LEN_SMALL
{
- my @bl = $CL->_base_len(); my $bl = $bl[4];
+ my @bl = $CL->_base_len(); my $bl = $bl[5];
$x = '1' x $bl . '0' x $bl . '1' x $bl . '0' x $bl;
$y = '1' x (2*$bl);