From: Jarkko Hietaniemi Date: Tue, 11 Sep 2001 11:40:51 +0000 (+0000) Subject: Retract #11984: div() being redefined, and 1397 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f01e9eb568fcd05e80ff03d218f3770ea23fc08;p=p5sagit%2Fp5-mst-13.2.git Retract #11984: div() being redefined, and 1397 failing on 64-bit platforms. p4raw-id: //depot/perl@12001 --- diff --git a/lib/Math/BigInt/Calc.pm b/lib/Math/BigInt/Calc.pm index 2191057..ebaf5a1 100644 --- a/lib/Math/BigInt/Calc.pm +++ b/lib/Math/BigInt/Calc.pm @@ -8,7 +8,7 @@ require Exporter; use vars qw/@ISA $VERSION/; @ISA = qw(Exporter); -$VERSION = '0.11'; +$VERSION = '0.10'; # Package to store unsigned big integers in decimal and do math with them @@ -19,8 +19,7 @@ $VERSION = '0.11'; # - fully remove funky $# stuff (maybe) # USE_MUL: due to problems on certain os (os390, posix-bc) "* 1e-5" is used -# instead of "/ 1e5" at some places, (marked with USE_MUL). Other platforms -# BS2000, some Crays need USE_DIV instead. +# instead of "/ 1e5" at some places, (marked with USE_MUL). # The BEGIN block is used to determine which of the two variants gives the # correct result. @@ -30,7 +29,9 @@ $VERSION = '0.11'; # constants for easier life my $nan = 'NaN'; -my ($BASE,$RBASE,$BASE_LEN); +my $BASE_LEN = 7; +my $BASE = int("1e".$BASE_LEN); # var for trying to change it to 1e7 +my $RBASE = abs('1e-'.$BASE_LEN); # see USE_MUL BEGIN { @@ -45,17 +46,6 @@ BEGIN $BASE_LEN = $e-1; $BASE = int("1e".$BASE_LEN); $RBASE = abs('1e-'.$BASE_LEN); # see USE_MUL - if (int($BASE * $RBASE) == 0) # should be 1 - { - # USE_DIV instead - *{_mul} = \&_mul_use_div; - *{_div} = \&_div_use_div; - } - else - { - *{_mul} = \&_mul_use_mul; - *{_div} = \&_div_use_mul; - } } # for quering and setting, to debug/benchmark things @@ -218,7 +208,7 @@ sub _sub } } -sub _mul_use_mul +sub _mul { # (BINT, BINT) return nothing # multiply two numbers in internal representation