This file contains all the CHANGES and bugfixes from original BigInt/BigFloat
to the rewritten one. For a complete list of changes see HISTORY:
v1.37:
general:
+ It is subsequent faster than the original in many places
+ Can use alternatives to drive the math via use Math::BigInt lib => 'name';
+ regression test suite greatly enlarged to cover more problematic cases
+ added example scripts (prime.pl, bigprimes.pl, hailstone.pl)
+ documentation fixed and greatly enhanced
+ BigInt is sub-classable with very little effort, see M::S or M::BF
+ subclasses of Math::BigInt know all the same methods, so that you can call
$x->some_method() without having to know which type of class $x is
caveats:
+ bstr() and stringify now drop the leading '+' (to make overloaded cmp work
as expected when cmp'aring to scalars and other objects (read: bugfix)
+ spaces are no longer allowed in a number (but may precede or follow it)
input:
+ underscores are now valid between any two digits
+ integers of the form 1E2, 1.23E2 etc are now valid for BigInt.pm, too
+ hexadecimal numbers of the form 0xabcdefABCDEF0123456789
+ binary numbers of the form 0b010101011
bugs and buglets fixed over Mark's original:
+ 0**0 gave NaN instead of 1
+ -1**y gave -1 instead of +1 for even y
+ +x/0 is now +inf, -x/0 is -inf (both were NaN)
+ mod/div for negative numbers were incompatible to Perl's way
+ added P. Prymmer's OS/390 '/1e5 vs *1e-5' patch w/o the performance snag
+ incorporated all the patches to the core modules by John Peacock
+ BigFloat::bxxx() works as well as BigFloat::fxxx()
+ Math::BigInt->new(10) / Math::BigFloat->new(2) returned NaN (ditto for
other subclasses of Math::BigInt)
+ $a = new Math::BigInt; creates now a +0, while "" still gives a NaN
This supresses all warnings on undef arguments. Wether this is better...
+ import would always use "Math::BigInt" and clash with Exporter
+ use Math::BigInt qw(bneg); $a = bneg('1234'); etc did not work at all
+ $x->xxx() now modifies $x in all cases of modifiers and actually returns
the same $x (e.g. not a plain scalar or a different reference). All
testing routines leave $x alone. bpow(), fround(), ffround() etc were
broken in this regard.
accuracy and precision:
+ there is now support for both accuracy (significant digits) and precision
(fixed number of digits after decimal point), which by default is off
+ objects/numbers now can have a local accuracy/precision
internal fixes:
+ uses a blessed hash ref instead scalar ref (easier subclassable)
+ my instead of local
+ use strict and -w
+ s/$[/0/ (after all, $[ = 1; in main does not effect this package)
+ $# partially removed ($#y is scalar @y -1, $#$y is scalar @$y-1 - ugh!)
+ added LICENSE section and file
new stuff:
+ bacmp (acmp), because needed for more efficient add()
+ bint() for writing shorter code (exportable new())
+ bzero(), bnan(), sign(), binf()
+ is_zero(), is_nan(), is_one(), is_odd(), is_even(), is_inf()
+ digit(), as_number(), is_positive(), is_negative()
+ mantissa(), exponent(), parts(), length(), copy()
+ bgcd accepts now lists
+ blcm (also accepts lists)
+ fmod() (Thanx J. Peacock) and fdiv() in list context
+ round(accuracy,precision,mode) round to accuracy/precision using mode
+ bpow() for BigFloat
+ bfloor(), bceil()
Please send me test-reports, your experiences with this and your ideas - I love
to hear about my work!
Tels <http://bloodgate.com/>