Commit 0d6b4aa1 authored by gregor herrmann's avatar gregor herrmann

Imported Upstream version 1.9993

parent ba273af8
BUGS 100644 → 100755
For an updated list of bugs, see
https://rt.cpan.org/Public/Dist/Display.html?Name=Math-BigInt
The following list is not up to date:
Known bugs:
......
......@@ -9,8 +9,10 @@ The file NEW lists only the changes for the latest version.
##############################################################################
Math::BigInt::Calc:
2001-07-09 v0.06 Tels
* first release
2001-07-15 v0.07 Tels
* applied Philip Newtons spelling and doc patch(s)
* accidentally had the old, slow mul() code in. Oups.
......@@ -18,28 +20,38 @@ Math::BigInt::Calc:
* also the speedup in mul() occurs with $x having lots of zeros, not $y.
* first argument is always classname, so removed checks and shift
* shift in base ten by _lsft() and _rsft()
2001-07-15 v0.08 Tels
* fixed bug in mul() shortcut
2001-07-20 v0.09 Tels
* don't use warnings for older Perls
2001-08-24 v0.10 Tels
* no longer export anything, ignore import calls
2001-09-07 v0.11 Tels
* automatically USE_MUL or USE_DIV
2001-10-03 v0.12 Tels
* _div: 99999 => $BASE-1 ($MAX_VAL), that made some div's fail if $BASE != 5
2001-10-23 v0.13 Tels
* better detection of BASELEN by matching against expected pattern
2001-11-04 v0.14 Tels
* added _mod() for faster $x % $y
2001-11-11 v0.15 Tels
* added _dec() and _inc() for much faster $x++ and $x--
2001-11-19 v0.16 Tels
* fixed comments a bit
* finished _mod() when $y < $BASE and $BASE % $y != 0 and $BASE % $y != 1
* streamlined _mod() loops a bit
* added _pow() for faster bpow()
* small fix to make 5.005_03 happy ($x = shift @prod vs $x = shift @prod || 0)
2001-12-06 v0.17 Tels
* added _sqrt() for more speed
* _sqrt() shortcut for small (< $BASE) numbers for better performance
......@@ -50,66 +62,84 @@ Math::BigInt::Calc:
* streamlined _acmp()
* cap of 5 for BASE for UTS and UNICOS/Cray
* better test to find out what BASE should be (use +0.0 to force floats)
2001-12-20 v0.18 Tels
* added _as_hex() and _as_bin() with 16 bit chunks
* from_bin() now uses oct() and 16 bits per iteration
* removed needless return statements
2001-12-23 v0.19 Tels
* first working version of using two different bases: one for mul/div, the
other for all other ops, including converting via _to_large()/_to_small()
2002-01-07 v0.20 Tels
* better detection of higher-int-only base (but disabled due to failures)
* streamlined converting
* turned dual-basis off by default (now 7-7 on 32 bit and 9-9 on most 64 it)
* _str() uses int() on first part to avoid '0000' instead of '0'
2002-02-10 v0.22 Tels
* _sqrt1() => _sqrt() (oups)
* much better guess for _sqrt() resulting in faster sqrt
* added _fac()
2002-02-24 v0.23 Tels
* from_bin() repack input and use from_hex(): twice as fast
2002-02-27 v0.24 Tels
* streamlined _mod() shortcuts
* _div() has shortcut if $y is very small
2002-03-03 v0.25 Tels
* started _square() (not done yet)
2002-03-17 v0.26 Tels
* a fix in _rsft() that left empty array instead of (0)
* a fix in _sub(): early out made -1 + 100000000001 == 0 (if length($y) > 8)
2002-05-30 v0.28 Tels
* added _modinv(), _modpow() (not yet implemented)
2002-06-09 v0.29 Tels
* filled in _modpow()
2002-06-10 v0.30 Tels
* undef mul/div in case Calc.pm get's loaded twice
* fix in _as_hex() and _as_bin() for older Perls
* speedups in _pow() and _modpow()
2002-08-13 v0.31 Tels
* _acmp() no longer calls _len() => tad faster
* some cleanup of old code, added some more comments
2002-08-21 v0.32 Tels
* fixed bug in _rsft() that did not set result to 0 in some cases
* _modinv() now works, thanx to the all-positive algorithm
* much more tests in bigintc.t (taken over from FastCalc)
2002-09-09 v0.33 Tels
* _fac() keep $n as scalar if possible
* test for when to USE_MUL or not was inverted
* _mul() is about 6 times faster if $y is small and $x is big
2002-09-27 v0.34 Tels
* fixed bug in mul_use_div() shortcut that used * $RBASE instead of / $MBASE
* $caught & 1 != 0 vs ($caught & 1) != 0 (changed to $caught != 2)
* $i %= $MBASE does not work on ARM (v5.003), so make it $i -= $car * $MBASE
* removed unused LEN_CONVERT code (smaller memory footprint)
2003-07-06 v0.35 Tels
* fixed a bug in _floor() which caused ffloor(0.1234567) to fail.
(Thanx to cpan@ali.as for finding it and sending a fix/testcases)
* make _as_hex() and _as_bin() handle 0, and make them faster for very
short numbers (less than BASE_LEN digits)
2003-08-31 v0.36 Tels
* fixed a bug in div_use_div() that computed remainder wrong if X == X and
X was very large
* fixed a off-by-one error discovered with mbi_rand.t in _div_use_XXX()
(one internal in $x overflowed, thus the wrong computation)
2003-12-11 v0.37 Tels
* implemented _log_int() with a simple and fast "iterative" method
* fixed bug in _root(): int() rounds sometimes wrong, so use sprintf()
......@@ -125,6 +155,7 @@ Math::BigInt::Calc:
* _as_bin() used %b, which was not known to v5.5.3 - workaround that
* implemented _log_int(), which is simple and very fast
* implemented the missing pieces for _root() (which is quite fast)
2003-12-30 v0.38 Tels
* guess _log_int() result based on $base if $base < $BASE
* _pow() handle cases 0 ** Y, 1 ** Y, X ** 0 and X ** 1
......@@ -132,8 +163,10 @@ Math::BigInt::Calc:
* _root() was wrong for numbers like 9 (0b1001) because they start with
the pattern /^0b1(0+)/ (missing '$' in regexp) and after fixing this
it was dead slow for large numbers.
2004-01-25 v0.39 Tels (not released)
* _zeros(0) is 0, not 1
2004-03-12 v0.40 Tels
* added: api_version(), _ten(), _two(), _is_ten(), _is_two(), _gcd()
* streamlined: is_foo() methods
......@@ -143,62 +176,83 @@ Math::BigInt::Calc:
than the positive one caused an error due to cutting instead padding
* _ior(): forgot to calculate the proper sing of result, making, for
instance, 30 | -4 go wrong
2004-04-05 v0.41a Tels (not released)
* removed the unused integer-detection code and combined the two BEGIN blocks
2004-07-30 v0.41 Tels
* from_hex() convert 28 bits (vs 16) at a time, faster (helps from_bin(), too)
* potential bug in padding with '0' in _digit()
* fixed undef warnings in fceil(0.222222222222...) (thanx kenny!)
2004-10-10 v0.42 Tels
* fix critical bug in _from_hex() with parts that were to big for one part
(introduced in v1.72, thanx Mark Lakata for finding it!)
2005-01-01 v0.44 Tels
* small cleanups
* shortcut for numbers of same length in _div, where X > Y
2005-03-20 v0.45 Tels
* fix the div() shortcut for short numbers to actually work
2005-03-29 v0.46 Tels
* avoid crash in FastCalc by making $BASE and $BASE_LEN use vars qw//;
2005-05-17 v0.47 Tels
* remove shortcut in div(), it wasn't working properly
2007-01-27 v0.48 Tels
* support for octal numbers
2007-04-16 v0.49 Tels
* API version 2.0 support: add _1ex(), _alen()
* make _fac() about twice as fast
2007-05-05 v0.50 Tels
* speed up _mul() by "use integer;"
* we do not need to remove zeros after mul()
* implement an alternative algorithm for _fac()
2007-05-30 v0.51 Tels
* use CORE::hex() instead of hex() to help bigint/bignum/bigrat
* use 9 digit parts on 64bit integer or long double systems
2007-09-16 v0.52 Tels
* fix 64bit ints on Perl v5.8.0 (thanx zefram)
##############################################################################
Math::BigInt::CalcEmu:
2003-12-26 v0.01 Tels
* first version, taken over all the code from BigInt
2003-12-30 v0.02 Tels
* the code in Calc::_root() uses now sprintf(), but the one in Emu was not
2004-01-13 v0.03 Tels
* $VERSION was overriding the $VERSION from MBI (Thanx Gisle Aas!)
2004-03-12 v0.04 Tels
* removed unnec. emulation routines (all except _signed_foo)
##############################################################################
Math::BigInt::Scalar:
2001-07-09 v0.04 Tels
* first release
2001-07-15 v0.05 Tels
* first argument is always classname, so removed checks and shift
2001-07-20 v0.06 Tels
* don't use warnings for older Perls
2001-08-24 v0.10 Tels
* no longer export anything, ignore import calls
2002-01-07 v0.11 Tels
* fixed version
* added DESCRIPTION section to stop pod2man complaining
......@@ -207,14 +261,21 @@ Math::BigInt::Scalar:
##############################################################################
Math::BigFloat:
2001-02-18 1.00: started work
2001-02-22 1.01: new() and bstr() work now (sort of)
2001-02-24 1.02: add()/sub() should work now
2001-03-06 1.03: layed more foundations (mul() etc)
2001-03-27 1.04: bmul/bdiv/cmp work now, better _norm()
2001-03-31 1.05: fixed bstr() and bsstr()
added AUTOLOAD for fxxx() to work as well as bxxx()
enhanced and fixed testsuite for mul/cmp/add/new
2001-04-05 1.06: bstr() returns NaN for NaN's
renamed _norm to bnorm, added it to AUTOLOAD for compatibility
fixed bug Math::BigFloat->new(Math::BigInt->new(3));
......@@ -222,31 +283,38 @@ Math::BigFloat:
bdiv() works now with precision
precision()
doc about mixing different objects in overloaded math
2001-04-07 1.07: bug in bstr() for 0.xxx style numbers, as well as for "-xxx"
babs(), bneg(), bint() work now
empty stubs for bsqrt(), bround() and bmod()
exponent(), mantissa(), parts() work now as expected
2001-04-18 1.08: exponent(), mantissa() and parts() now return BigInt's
bnorm: 0Ey => 0E1 (was wrongly 0E0)
fixed is_zero()
added bround() and bfround() (only truncate mode)
fixed bug in bstr() for 1.203E-2 style numbers (Thanx Tom!)
2001-04-23 1.09: length() in list context return length of mantissa & exponent
bug in bstr() for '0.x' style strings
added bsqrt()
workaround for Perl v5.6.0 overload-bool bug (via MBI)
fixed rounding
2001-05-07 1.10: Tom's round fixes (minus one nit)
new: .xxx, -.xxx, +.xxx etc are valid inputs, while
'.', 'x x x' and 'Exxx' are now invalid
finally got rid of C&P of overload section and clone()
2001-05-09 1.11: bug bcmp() (1e-08 was < 0, aka fractions were broken)
2001-05-11 1.12 Tels
* taken over testsuite from John P.
* added tests for compare with fraction
* fixed fcmp/fround/ffround
* added accuracy/precision/fallback/round_mode
* bsstr('NaN') returned 'NaNeNaN'
2001-06-09 1.13 Tels:
* adjusted fdiv() so that it now works proper with old testcases
* (except a few nits, see testsuite and ACCURACY)
......@@ -256,6 +324,7 @@ Math::BigFloat:
* fixed fpow(), added tests for it
* hexadecimal integer input (0xdeadbeef)
* is_one() for -1 was wrongly true, tests for is_one()
2001-06-13 1.14 Tels:
* accuracy/precision rounding after fdiv() was missing
* binary integer input (0b01110 etc)
......@@ -267,8 +336,10 @@ Math::BigFloat:
* $x->bpow($y) for negative $y was unfinished
* added is_inf(), binf() and some support for +-inf in new(), bsstr() etc
* added tests for is_odd(), is_even(), _set() and is_zero(), is_inf(), bsstr()
2001-06-15 v1.15 Tels
* added bfloor(), bceil()
2001-07-09 v1.16 Tels
* is_positive(), is_negative()
* various pod fixes (overlong =item, spelling erorrs etc)
......@@ -276,42 +347,51 @@ Math::BigFloat:
* infinity support for fcmp(), fpow()
* nailed the bug in fdiv() that caused fsqrt() to fail. fsqr() works now, too.
* more tests
2001-07-15 v1.17 Tels
* applied Philip Newtons spelling and doc patch(s)
* added bone()
* tests for bnan() and bone()
2001-08-02 v1.19 Tels
* 123/+-inf => 0, test for that and -1,0 / NaN => NaN
* +123 / 0 => +inf, -123 / 0 => -inf (was missing in MBF)
* fixed +-inf handling in bacmp/bcmp/bsub/badd/bdiv and tests for that
* padd bstr() output of numbers with set A or P
* remove bfloat() (Math::BigInt->bfloat() did not work, anyway, see bint())
2001-08-03 v1.20 Tels
* streamlined bcmp
* drop leading '+' for inf
2001-09-03 v1.21 Tels
* serious bug in bcmp() caused 1.5 to be greater than 2. Yikes!
* bcmp() did not only return -1,0,1 and undef but other values, too
* new('inf') produced NaN (was expecting '+inf')
* exponent(), mantissa() & parts() failed or returned scalars for inf,-inf,NaN
* include finf in AUTOLOAD list
2001-10-03 v1.22 Tels
* Quite a lot of rounding fixes
* $x->bnorm() is 4 times faster if $x == 0
* $x->bround($n) is 43 times faster if $n > $x->{_a} (no-op)
* added as_number()
2001-10-05 v1.23 Tels
* fixed facmp() (was broken the same way as fcmp())
* more rounding fixes from John P.
2001-11-11 v1.24 Tels
* bacmp() fix for +-inf
* streamlined new()
* faster finc()/fdec()
2001-11-18 v1.25 Tels
* streamlining fixes in new() were missing
* further streamlining in new() for 12345e1234 cases (fraction part empty)
* added $rnd_mode support for compatibility
* replaced the 'laber schwad blah blah' pod section by a pointer to MBI
2001-12-06 v1.26 Tels
* fneg() failed (now hand up to MBI)
* frsft() and flsft() were no aliases to brsft() and blsft()
......@@ -323,6 +403,7 @@ Math::BigFloat:
* make fsqrt() subclass proof by using $self instead of Math::BigFloat
* bzero(), bone(): take additional A and P and store 'em
* bnan(), binf(): clear A and P
2002-01-06 v1.27 Tels
* overload for log() and flog()/blog()
* bzero()/bone() handling of A & P was broken
......@@ -332,17 +413,21 @@ Math::BigFloat:
* fsqrt() didn't modify $x sometimes, but returned a new reference
* fsqrt(): calc 4 more digits for rounding, not 1 (endless looping otherwise)
* fmod() now actually works
2002-02-10 v1.27 Tels (forgot to increase version)
* ffac()
* various: disable Math::BigInt::upgrade to avoid deep recursion
2002-02-16 v1.28 Tels
* fixed use Math::BigFloat ':constant';
* fixed flog() function to calc right result, honour rounding-globals
2002-02-24 v1.29 Tels
* overload for 'log' now inherited by BigInt
* _binf(), _bnan(), _bone() and _bzero() instead of longer bone() etc
* inf/NaN fixes from v1.51 were missing for BigFloat
* bdiv() upgrades if applicable
2002-02-25 v1.30 Tels
* bug in bsub() with not rounding when $x->bsub(0) was also in MBF
* bcmp() and bacmp() 5 times faster due to numify() (might have now impose a
......@@ -354,16 +439,21 @@ Math::BigFloat:
* optimized as_number (nearly twice as fast)
* $x->badd(0) forgot to round $x
* downgrade and upgrade are valid methods for inheritance
2002-03-03 v1.31 Tels
* bpow() can handle second arguments beeing non-integer (f.i. 2 ** 0.2)
* $x->bpow(0.5) optimized to $x->bsqrt();
2002-05-19 v1.32 Tels
* upgrade used badd() instead of bmul() inside bmul()
* bpow() now uses slower, but more correct way for fractions (this needs work)
2002-06-09 v1.33 Tels
* import() fixed for older Perls
2002-06-10 v1.34 Tels
* upgrade used badd() instead of bmul() inside bmul() (again! arg!)
2002-07-07 v1.35 Tels
* bfround() used accidentally BigInt math; is now about 5.6 times faster for
small numbers
......@@ -371,6 +461,7 @@ Math::BigFloat:
* doc for accuracy()/precision()
* $x->bmod() was not modifying $x in place when returning NaN/inf/-inf
* avoid unec. calls to objectify() for binary op's
2002-08-13 v1.36 Tels
* as_hex() and as_bin() work now at least for inf, NaN and integers
* fixed bsstr() (and thus also numify()) for negative numbers - Ouch!
......@@ -378,8 +469,10 @@ Math::BigFloat:
when $d > $a
* numify() returned '+inf' instead of 'inf'
* (more) tests for bsstr(), numify(), as_hex(), as_bin
2002-08-20 v1.37 Tels
* bcmp()/bacmp() upgrade now if requested
2002-09-08 v1.38 Tels
* fix that bsqrt() would hang for certain inputs. Instead of using Newton's,
we now rely on the fact that sqrt(x*y) = sqrt(x) * sqrt(y) by setting y to
......@@ -389,6 +482,7 @@ Math::BigFloat:
instead of beeing equivalent to $x->bsqrt(undef)
* ditto for $x->bpow($y,0), $x->blog($base,0) and $x->bdiv($y,0)
* use File::Spec was needless, since it was required later on again
2002-11-03 v1.39 Tels
* $x->bpow($y,0), $x->blog($base,0) and $x->bdiv($y,0) were still not doing
the right thing and no tests caught it *sigh*
......@@ -414,13 +508,16 @@ Math::BigFloat:
* trap_nan/trap_inf really croak on any attempt to create an NaN/inf
* spellings of Bigint => BigInt
* simplify config() by using SUPER::config()
2003-07-06 v1.39 Tels
* $x->blog($base) can handle a $base which is a Math::Bigint
* replace die() with Carp::croak
2003-09-23 v1.40 Tels
* bstr(): removed unnec. BigInt math and inlined is_zero() => great speedup
(10% to factor 6.5 depending on input)
* replace $self->_one() by $self->bone()
2003-12-11 v1.41 Tels
* flog(): 0.5, 0.25, 0.125, 2, 4 and 8 were not scaled properly back to
1, instead they remained 0.5 and 2, respectively. This was a '<' vs.
......@@ -432,21 +529,25 @@ Math::BigFloat:
2, 10 and 0.1 slightly faster. This also helps log($x,2) and log($x,10).
* bfac() slightly faster for small arguments
* downgrading to bigint failed for .2e2 (produced 200 vs. 20)
2003-12-30 v1.42 Tels
* ffac(inf) is inf, not NaN
* flog() calculate integer result first, and if it fits, return it
this makes it much faster in case the result is a perfect integer
* require (instead of use) Exporter
* froot() calculates an integer result first, and it if fits, returns it
2004-01-13 v1.43 Tels
* small fixes in AUTOLOAD
* delete $x->{_a} vs. $x->{_a} = undef to save memory
2004-03-12 v1.44 Tels
* bpow() computed -X ** Y wrong for Y that are odd
* use $HALF instead of 0.5 to speed up broot()
* use Calc instead of BigInt for parts, that makes it roughly 2x faster
it also saves memory (419 vs. 767 bytes per (small number) object)
* bmod() did needlessly test for NaN arguments twice
2004-07-30 v1.45 Tels
* simple inherit bsub() from BigInt, also fixes bsub() failing under
$x -= $x - Thanx Peter J. Acklam!
......@@ -454,13 +555,16 @@ Math::BigFloat:
* bfround() and bround() are about 10% faster when going via Math::BigInt's
bround() due to constructing a fake BigInt instead of going via ->new()
* fixed undef warnings in bpow(0,$y) ($y non-integer) (thanx kenny!)
2004-08-13 v1.46 Tels
* blog(10,10) ($x == $y) returned '1.0000...' instead of '1'
2004-10-10 v1.47 Tels
* inf/NaN fixes for bpow()
* eliminate the need for _zeros() in new() (speed-up for GMP et. al.)
* eliminate _is_zero() in new() (small speed up)
* added shortcut for simple numbers in new() (speed up)
2005-01-01 v1.48 Tels
* use new interface to _scale_a() and _scale_p() in BigInt
* add bneg() and inline is_zero() in it, making it 1.6 times faster
......@@ -468,26 +572,32 @@ Math::BigFloat:
makes some ops (bsstr(), bneg etc) about 2% faster for small numbers
* use MBI::_register_callback() to get notified of lib changes
* bgcd()/blcm() never worked, so fix them for integers and add tests
2005-03-20 v1.49 Tels
* remove dependecy on Scalar::Util in bdiv()
* bdiv() cache result of "!$y->is_one()" for wantarray case to make
($res,$rem) = $x->bdiv($y); about 10% faster
2005-03-29 v1.50 Tels
* fix rounding doc, add notes about prevision vs. accuracy
* set FastCalc as default (we still use whatever MBI uses)
2005-04-10 v1.51 Tels
* fix new() to work with Math::BigInt::Pari
2007-01-27 v1.52 Tels
* fix brsft() and bpow() in list context only return on number (bug #21413)
* make as_int() return a BigInt, too (not just as_number()) (bug #21412)
* add as_oct()
* bpow(): handle negative X and negative Y (instead of returning NaN)
2007-03-04 v1.53 Tels
* fix #25144: [PATCH] Math::BigFloat->new considers any reference a BigInt
(Thanx mschwern!)
* fix bug #13866: NaN (in bignum queue)
* fix bug #21586: Incorrect result when comparing with NaN
* fix bug #15896: "==" overloading is broken for "NaN"
2007-04-09 v1.54 Tels
* fix bug #21747: Re: weirdity in bignum... (powers and high precision):
infinite loops for blog() (and consequently bpow()) if you requested
......@@ -500,19 +610,23 @@ Math::BigFloat:
This makes computing _log(10) much faster, so that computing blog(N) is
about a factor of 5 faster when N >= 10 or N <= 0.1
* add bexp()
2007-04-16 v1.55 Tels
* make bexp() much faster (esp. under GMP) by caching the first coefficients
and rewriting the inner loop
* support "try" and "only" in import()
2007-05-05 v1.57 Tels
* add bnok() method (n over k)
* add all the missing modify() hooks
2007-06-30 v1.58 Tels
* remove Exporer from @ISA
* support config('lib') as shortcut for config()->{lib}
* add bpi(), bcos(), bsin(), batan(), batan2() methods
* add bmuladd()
* streamline the is_xxx() and copy() methods
2008-04-20 v1.60 Tels
* fix #34459: bsqrt() breaks on floats with enough digits (Thanx Niko Tyni!)
* fix #35238: batan2() handles inf/+inf wrong
......@@ -521,31 +635,41 @@ Math::BigFloat:
##############################################################################
Math::BigInt:
2000-11-13 v1.02 Tels
fixed sub and mul (sort of)
found out that "$wanted = shift || return bzero()" causes a call to numify,
testing for undefined fixes this problem (but might waste more time for
a new(0), will save time on average.
2000-11-14 v1.03 Tels
x**0 => 1 (instead of x)
fixed bigintpm to include bpow, binc, bdec, new() test
2000-11-15 v1.04 Tels
fixed bigintpm to test '++' and '--' properly
done div, fixed mul/bpow (13 tests remain)
2000-11-16 v1.05 Tels
8 tests remain
new copies _all_ fields, not only Math::Bigint ones
2000-11-19 v1.06 Tels
7 tests remain
bgcd accepts lists, added blcm
2000-11-20 v1.07 Tels
objectify fixed to not make copies and work with subclasses
2000-11-22 v1.08 Tels
fixed all but one test (band bior bxor etc)
2000-11-23 v1.09 Tels
fixed bug in bmul (and thus bpow) (self multiply works now)
2000-11-24 v1.10 Tels
finally made it Math::BigInt (w/o trailing 's')
2001-02-14 v1.11 Tels (first release)
* fixed bug in band(), bxor(), etc that used badd($x, fixed_number_here);
* since subclasses might not be happy with fixed numbers, make sure we pass
......@@ -553,6 +677,7 @@ Math::BigInt:
* fixed bug in band/bxor/bior which destroyed second argument
* bxor/band/bior work now correctly for subclasses
* ++ and -- are now a tad (ca 5%) faster
2001-02-16 v1.12 Tels
* accidentally dropped self-multiply test in bigintpm.t
* fixed bug in overloading cmp
......@@ -567,8 +692,10 @@ Math::BigInt:
the '+', adapted all the tests, changed the doc, etc.
BigInts behave now transparently like build-in scalars in integer/string
context ;o)
2001-02-18 v1.13 Tels
* got rid of duplicated copy() code in new()
2001-02-21 v1.14 Tels
* overload +=, -=, *= and /= for about 20-30% more speed if both args have
roughly same length
......@@ -576,6 +703,7 @@ Math::BigInt:
an O(1) case instead of O(N)
* fixed (non-critical) bug that caused objectify in numify/bool/stringify to
create scratch objects from undef params.
2001-02-24 v1.15 Tels
* $x / $x is now a lot faster (more O(1) than O(N))
* 10 ** $x is now a lot faster (more O(N/5) instead of O(N))
......@@ -584,6 +712,7 @@ Math::BigInt:
* -a % b = +c (was -c) to be compatible with perl
* added $x->length() and test for it; fixed _digits() (was off by 1)
* objectify() was not exported, added tests for objectify()
2001-03-09 v1.16 Tels
* Math::BigInt::badd(4,5) and Math::SomeChildOfBI->badd(4,5) work now
* '$x = scalar (**|%|+|-|*|\) $object;' failed (was not tested, either)
......@@ -596,22 +725,27 @@ Math::BigInt:
* tests after "use Math::BigInt :constant" were screwed due to not using eval
* $x->numify() (for $array[$x] = 0; etc) is much faster now
* added caveat documentation for $x = -$x; and $x *= string1 operator string2;
2001-03-24 v1.20 Tels
* added: is_nan()
* bug in bmod/bdiv, I forgot some cases with negatives. Thanx to Bruce Fields!
* documented ':constant' and eval() crash on Perl 5.00x
* documented BigInts behaviour of bmod/bdiv and use integer
2001-03-30 v1.21 Tels
* bool() works now under 5_005
* bug in bsub where numbers with at least 6 trailing digits after any op failed
2001-04-05 v1.22 Tels
* documented Peters OS/390 patch/changes (fix was in for quite some time)
* fixed bug Math::BigInt->new(Math::BigFloat->new(3));
* objectify() with other objects than BigInt as further args, copy() etc
* $x->digit($n) to query fast value of Nth digit
* as_number()
2001-04-07 v1.23 Tels
* spelling errors in pod
2001-04-23 v1.3 Tels
* added (compatible to MBF) mantissa(), exponent() & parts() as well as tests
* _trailing_zeros()
......@@ -621,6 +755,7 @@ Math::BigInt:
* added is_valid to testsuite to see whether invalid objects are created
* added bsqrt()
* workaround coredump bug in bool() for v5.6.1
2001-05-08 v1.31 Tels
* _ between digits now accepted, ' ' no longer valid inside (but at front/end)
* Exxx is NaN, and no longer produces warning
......@@ -629,8 +764,10 @@ Math::BigInt:
* fixed overload (w/ _swap/copy), subclasses can inherit it easily
* removed clone()
* added bsstr()
2001-05-11 v1.32 Tels
* added accuracy/precision/fallback/round_mode
2001-06-09 v1.33 Tels
* bround() no longer uses 10 ** $pad and is thus much faster when rounding up
* fixed and added rounding benchmark (did time bmul instead bround)
......@@ -642,14 +779,17 @@ Math::BigInt:
* $x->accuracy(), $x->precision() actually round $x to the set value
* tests for is_one()
* hexadecimal integer input (0xcafebabe etc)
2001-06-13 v1.34 Tels
* binary integer input (0b01110 etc)
* fixed: '-0x0' left '-0'
* added is_inf(), binf() and some support for +-inf in new(), bsstr() etc
* added tests for is_odd(), is_even(), _set() and is_zero(), is_inf(), bsstr()
2001-06-15 v1.35 Tels
* added bfloor(), bceil()
* fixed bior(), bxor(), band() for $x->bxxx(NaN,0), added modify() to them
2001-07-04 v1.36 Tels
* is_positive(), is_negative()
* various pod fixes (overlong =item, spelling erorrs etc)
......@@ -658,6 +798,7 @@ Math::BigInt:
* fixed tests for bacmp() (could never fail)
* removed internal _set() and tests for it
* +-inf handling in bcmp(), bpow()
2001-07-15 v1.37 Tels
* applied Philip Newtons spelling and doc patch(s)
* Benjamin Trott: _split() is faster for numbers that need no splitting
......@@ -670,22 +811,27 @@ Math::BigInt:
* tests for bnan() and bone()
* Math::BigInt::Calc now determines biggest $BASE to use. Default should now
be 1e7 on most systems, giving 20% to 40% speedups.
2001-07-15 v1.38 Tels
* test for mul() shortcut
2001-08-02 v1.39 Tels
* fixed history (duh!)
* assign return values from $CALC back to $x->{value}
* fixed +-inf handling in a lot of places and tests for that
* band(), bxor() and bior() now work with negative inputs
* remove bint() (Math::BigFloat->bint() just DNDWIM and no sense, either)
2001-08-03 v1.40 Tels
* bxor(-$x,-$y) was broken (and not tested *sigh*)
* streamlined bcmp
* drop leading '+' for inf
* bxor(), band(), bior() with negative arguments don't get passed to lib
(makes it work with BitVect, Pari, GMP etc)
2001-08-08 v1.41 Tels
* fixed inf test (coredumps)
2001-09-03 v1.42 Tels
* bug in overload section causing performance losses in subclasses
* call $CALC->import() with list of libs
......@@ -694,24 +840,29 @@ Math::BigInt:
* $x->bmod() did not modify $x, only returned result. Oups.
* new('inf') produced NaN (was expecting '+inf')
* exponent(), mantissa() & parts() failed or returned scalars for inf,-inf,NaN
2001-10-05 v1.43 Tels
* $x->bround($n) is 43 times faster if $n > $x->{_a} (no-op)
* Heaploads of rounding fixes (and tests)
* Test for 99999-bug in Calc
2001-11-04 v1.45 Tels
* tests run now in subclass, too
* bmod() can use _mod in lib
* lots of tests fixed (assumed wrong base etc) and added
* bpow() about 10-15% faster for small numbers (like 2 ** 150, 3 * 200 etc)
2001-11-11 v1.46 Tels
* binc(),bdec() use lib (via _inc(),_dec()) => faster (see BENCHMARK)
* avoid the unnec. rounding bsub()/binc()/bdec() (badd() already took care)
* made bsub() faster by removing the bneg() overhead from it
2001-11-18 v1.47 Tels
* added $rnd_mode support for compatibility
* two 'my $t = ... if ..;' cases to 'my $t; $t = ... if ...;'
* added overload for %=, |=, &= and ^= for more speed
* _split(): check for 1e2e3 and reject it
2001-12-06 v1.48 Tels
* fixed pod in many places
* bmod: use round(), not bround()
......@@ -723,6 +874,7 @@ Math::BigInt:
* removed the EXPORT_OK except for objectify, _swap and bgcd/blcm
* bzero(), bone(): take additional A and P and store 'em
* bnan(), binf(): clear A and P
2002-01-07 v1.49 Tels
* as_hex() and as_bin() use 16 instead of 8 bits per iteration
* overload for log() and blog()
......@@ -733,6 +885,7 @@ Math::BigInt:
* embedded _find_round_parameters into round(), streamlined both versions
* round() now uses string-add to make it almost twice as fast
* bnot() did round twice
2002-02-10 v1.50 Tels
* bfac() and hook for _fac() in libs
* documented sub-classing and auto-upgrade
......@@ -742,19 +895,23 @@ Math::BigInt:
* Math::Big(Int|Float)->accuracy() clears precision, and vice versa
* small optimization in bdiv() regarding abs($x) < abs($y)
* brsft() for negative numbers in base 2 was completely wrong
2002-02-16 v1.51 Tels
* fixed bfround(-x) (f.i. 0.004->bfround(-2) resulted in 0.01, not 0.00)
* bfround(x) rounded at wrong place (off by one)
* calling bfround(x) rounded further and further instead of keeping result
* blog() upgrades if requested
* added doc stub for every public function
2002-02-24 v1.52 Tels
* hooks for _bin(), _bnan(), _bone() and _bzero()
* =head2 section for accuracy
2002-02-27 v1.53 Tels
* precisision typo
* fixed overlong pod =item
* added downgrade()
2002-03-03 v1.54 Tels
* really fixed overlong pod =item
* downgrade() and upgrade() with undef as argument didn't clear the variable
......@@ -763,22 +920,28 @@ Math::BigInt:
* bpow() upgrades if second argument is non-integer
* objectify disable downgrade (for MBF)
* new() twice as fast due to shortcut simple numbers, save _split() & _round()
2002-03-17 v1.55 Tels
* :constant picks up binary/hexadecimal constants
* Math::BigInt->digit(123) works now