```
2015-08-28 v0.2608 pjacklam
lib/Math/BigRat.pm
* Wrap long lines.
* Increment version number. (Sync with blead.)
2015-08-28 v0.2607 pjacklam
CHANGES
* Add changes from v0.2602 to v0.2606.
lib/Math/BigRat.pm
* Increment version number. (Sync with blead.)
inc/Module/Install.pm
* Update bundled version of Module::Install from v1.08 to v1.16.
2014-04-03 v0.2606 pjacklam
BUGS
* Add ref to https://rt.cpan.org/Public/Dist/Display.html?Name=Math-BigRat
MANIFEST.SKIP
* Misc. updates.
inc/Module/Install.pm
* Update bundled version of Module::Install from v1.00 to v1.08.
lib/Math/BigRat.pm
* Fix spelling errors.
* Avoid negative zero.
* Various POD corrections.
* Add refereces to CPAN testers, CPAN RT etc.
t/bigrat.t
* Test to avoid negative zero.
2011-02-13 v0.2602 pjacklam (1000 tests)
* Fix spelling errors (Peter John Acklam).
* Include latest versions test scripts shared with the Math::BigInt
distribution (Peter John Acklam).
* Add 00sig.t for testing the SIGNATURE file, 01load.t for explicitly
testing module loading and showing version information useful for
debugging (Peter John Acklam).
* Replace pod.t and pod_cov.t by 02pod.t as a generic script for testing
POD syntax, and 03podcov.t as a more generic script for testing POD
coverage (Peter John Acklam).
2010-09-15 v0.26 rafl 975 tests
* Remove obsolete test boilerplate that was once needed to test within the
perl core (Nicholas Clark).
* Convert tests from Test to Test::More (Nicholas Clark).
2010-09-13 v0.25 rafl 975 tests
* Re-upload 0.24 with a fixed SIGNATURE
2009-09-09 v0.24 Leto 975 tests
* Fix [perl RT #49565: SIGNATURES]
* Fix [perl RT #44827: Documentation incorrect]
2009-09-08 v0.23 Leto 975 tests
* Fix [perl RT #67244] hex "e" misunderstood by Math::BigRat
2008-04-06 v0.22 Tels 973 tests
* fix bug ##34584: hang when calling exp (Thanx Steve Wills!)
+ broot() normalizes result
+ bexp() works for values like '1/2' (sqrt), '1/4' (broot), etc.
+ broot() works for values like '2/3'
* added as_float() - return the BigRat as rounded Math::BigFloat
2007-09-16 v0.21 Tels 956 tests
* require Math::BigInt v1.88
* fix as_number() with Nan/inf (thanx zefram!)
* add POD stub for objectify() to make pod_cov.t happy
2007-06-30 v0.20 Tels 956 tests
* require Math::BigInt v1.87
* add bnok() and bexp()
2007-04-17 v0.19 Tels 934 tests
* fix the check in bnorm() as it breaks under Pari
* require Math::BigInt v1.83
* exponent() makes a copy, so we can skip copy()
* fix the licence back to be "perl"
2007-04-09 v0.18 Tels 934 tests
* install_as_core() to work around Module::Install bug
* remove PREREQ_FATAL since the toolchain is broken
* require Math::BigInt v1.82
2007-02-03 v0.17 Tels 934 tests
* include the spelling fixes for bleadperl
* more typo and POD fixes
* include from_bin(), from_hex() and from_oct()
* add tests for octal and from_hex()/from_bin()
* bundle and use Module::Install
Older revision history:
2001-11-21 v0.01 Tels
* first release
2002-02-24 v0.02 Tels (late night)
* ripped out doc and replaced by something closer to the truth
* subclass of BigFloat w/ overload section
* uses d/n instead of x/y for denominator and nominator
* tests from Math::BigFloat with a test subclass warping the input/output
* added preliminary bmul(), badd(), bdiv() methods
* added binf(), bone(), bzero() and bnan()
* added _bzero(), _bone(), _bnan() and _binf() (bnan() etc inherited)
* dummy blog(), bceil(), floor(), bfac() and bpow() functions
* parse input as '0.1', '0.1/0.1', '1/10', '10' or '10/0.1'
* input as Math::BigInts or Math::BigFloats is okay
2002-02-25 v0.03 Tels (early morning hours)
* fixed bstr()/bsstr() for negative output and inf/NaN
* _d/_n were accidentily swapped
* added numerator()/denominator()/parts() and doc and tests
* fixed is_one()
* '1/ ' is as invalid as '1/'
* badd/bsub/bmul: inf/NaN handling was wrong due to copy&paste (ha!) from bdiv
* more extensive testsuite (about 400 tests)
* bnorm() normalizes 0/x to 0/1
* badd()/bsub()/bmul()/bdiv() handle +/-/NaN/inf/-inf sign properly
* t/Math/BigRat/Test.pm: fixed bstr() and bsstr() to handle inf/NaN and signs
2002-03-19 v0.04 Tels
* bcmp/bacmp/as_number/bfloor/bceil work now
* bsqrt() is better now
* t/Math/BigInt/Test.pm is fixed now and makes a much better figure
(formerly almost all of the 1500 tests in bigfltrt.inc would fail. Now we
fail "only" 868 of 2014 tests, and most of them since the test dies early.
* added stubs for round, bfround, bround and certain others
2002-03-19 v0.04 Tels
* 5/7+3/7 hung under "Math::BigInt upgrade =>" (forgot local upgrade = undef)
* better testsuite
* added & fixed isa()
* new() can handle Lite
2002-03-26 v0.05 Tels
* various bugfixes
(local undef upgrade, Bigint handling, handling of string arguments)
* fixed up isa()
* removed some old and wrong comments
2002-05-23 v0.06 Tels
* added import() routine
* support for 'use Math::BigRat with => Foo::Bar;'
* support for 'use Math::BigRat lib => Foo::Bar;'
* bnorm() makes sure that both parts (n and d) are of class $MBI
* more documentation
* bugfix in new() with two arguments
* INSTALLDIRS => perl
2002-06-04 v0.07 Tels
* bfac() now works for integers (x/1), and returns $x->bnan() instead of
Math::BigRat->bnan() (modify in-place)
* bpow() faster for x/1 ** y/1 and x/z ** y/1 cases (some of the speedups are
two-digit factors :) - also some bugfixes
* bpow() no longer litters stdout
* removed some (all of them commented out) debug prints to reduce footprint
* shortened testfile bigrat.t
* some hardcoded 'Math::BigInt' replaced with '$MBI'
* bceil() would leave -0 in some cases
* (more) tests (all in all 628) for:
bceil/bfloor/bpow/bfac/parts/denominator/nominator/binc/bdec
* parts('-3/1') would return (3,1) instead of (-3,1)
* parts() did not work for NaN, +inf, -inf
* numerator()/denominator() did not work for inf,-inf,NaN
* new('1.2.2') was valid (resulted in 12/10 due to bug in BigFloat)
* new() for some cases left internal state not as 0/0 for NaN, inf, -inf etc
* binc()/bdec() were missing entirely
2002-08-13 v0.08 Tels
* bsstr() returned positive result for negative numbers - Oups!
* added a numify() so that $array[Math::BigRat->new('17/8')] works
2002-08-14 v0.09 Tels
* documentation was lacking a proper description, METHODS missing etc
* setting accuracy/precision in BigFloat/BigInt interfered with BigRat
* new testcases for the A/P fix in t/big_ap.t
* speedup: apply the same trick to avoid calls to objectify() like in BigInt
* speedup: badd()/bsub() did needless gcd(), copy() and bdiv()
* speedup: workaround for 'x.y.z'-valid bug in BigFloat no longer neccessary
2002-12-15 v0.10a Tels 700 tests (not released)
* as_number() forgot to disable $upgrade, resulting in BigRat again when
run under -Mbigrat -- thanx to Ian Phillips.
* fixed a bug in new() that failed with
Math::BigRat->new(Math::BigInt::Lite->new(123));
* fixed new() to work better under
use Math::BigRat with => 'Math::BigInt::Lite';
* add a test for "require Math::BigRat; $x = Math::BigRat->new(123); $x++;"
(it already works since we "use Math::BigFloat;"
* require Carp; Carp::croak () instead of simple die()
* implemented bmod() - Thanx Ian Phillips.
* bsqrt() now returns a big rationale - Ian again
* tests for bmod(), as_number(), bsqrt() and some NaN cases
* bfloor()/bceil() broke under use bigrat; due to missing upgrade-disabling
2002-12-18 v0.10b Tels 729 tests (not released)
* support for :trap_nan/:trap_inf
* doc for config()
* implement trapping of creation of NaN/inf/-inf
2003-07-06 v0.10 Tels 751 tests (released on 2003-08-13)
* one more die => croak conversion
* fix inf/NAN handling in new()
* fix bsqrt(3/4) and similiar cases failing with some obscure error, this was
a simple typo ({_n} vs. {_m}). Added tests for that.
* numify() is now much faster (38400 vs 720 tries/s on 2Ghz AMD XP2400+)
2004-01-07 v0.11 Tels 859 tests
* require Exporter vs. use it
* more tests for bacmp(), bnorm()
* fixed bug in bacmp() with ($x,[+-]inf) (Thanx to William T. Morgan!)
* fixed bug in new("+-inf/X") (e.g. "-inf/5" resulted in "inf", not "-inf")
* delete _a and _p on _d and _n, reduces size of a BigRat object from
887 bytes to 767 bytes on a x86 32 bit system. This also makes some
operations slightly (single-digit percentages) faster.
* bacmp() is about 20% faster
* bcmp() is:
* about 4 times faster if sign($x) != sign($y)
* about 20% faster if sign($x) == sign($y)
* added broot(), bmodinv(), bmodpow(), blog() so that their equivalent of:
# perl -MMath::BigRat=:constant -le '$a = 2.0 ** 32; print $a->broot(4)'
Can't call method "copy" on an undefined value at BigFloat.pm line 1442.
works now for integer arguments and inf/NaN, at least.
* doc: rationales => rational numbers
2004-02-15 v0.12 Tels 863 tests
* fixed bug in is_one() (segfault under v.5.6.x)
* implemented length() and digit() for integers
* beefed up testing class Test.pm to make more float tests work (185 of them
still fail)
* added AUTOLOAD to load fxxx() stubs (for BigFloat compatibility tests)
* $IMPORT for require and AUTOLOAD
* added as_bin(), as_hex() which work for integers, NaN, and +-inf
* implement broot() and blog() for non-integer numbers
* fixed blsft()/brsft() to work with undefined or scalar base
* added a copy() method to be independend from BigInt's copy()
* adopted to new internal format of Math::BigFloat v1.44 (from BigInt v1.70)
2004-10-22 v0.13 Tels 892 tests
* fixed digit(): it never worked due to dropping the second parameter
* fixed a bug in brsft() when passing arguments (2 vs. 3 in objectify)
* use Math::BigInt->config('lib') for parts instead of Math::BigInt
+ This makes everything go about 2..4 times faster :)
+ And it saves memory (408 vs. 807 bytes for a simple number)
* _as_float() is about 6 times as fast for integers (e.g. 123/1 vs. 2/3)
* denominator() returns 1 for +inf and -inf (+inf/1, -inf/1) instead of +-inf
* when using "lib => GMP;", certain things never worked:
+ sqrt() was not possible
+ new("2.3") did not work
+ new("12.3e-2") did not work
2005-01-01 v0.14 Tels 924 tests
* require Math::BigInt v1.74
* streamline copy()
* inline is_zero() into bneg(), making it about 50% faster
* more tests for bneg()
* register callback to get notified of lib changes from Math::BigInt
* much simpler import() logic
* new() accepts input like new(Math::BigInt->new(123),Math::BigInt->new(7));
* doc: as_hex(), as_bin(), add note about as_pos(), as_neg() and as_int()
* numify() now deals with large N and D by using BigFloat (Thanx Hugo!)
* numify() lost the sign on negative integer values (Thanx Zefram!)
2005-04-02 v0.15 Tels 924 tests
* no need to require Exporter
* rem no longer used 'with' from import
* add a few comments here and there
* fix import()'s handling of the lib argument (it didn't work)
* fix segfault under trap_nan in _bnan()
* remove unused IMPORT logic (require BigRat seems to work without it)
2007-01-28 v0.16 Tels 926 tests
* require Math::BigInt 1.78
* add support for 'try' and 'only'
* add pod tests
Please send me test-reports, your experiences with this and your ideas - I love
to hear about my work!
Tels <http://bloodgate.com/>
```