```
2016-12-13 v0.2611 pjacklam
* Add more logic to Makefile.PL regarding INSTALLDIRS (CPAN RT #119199
and #119225).
2016-12-11 v0.2610 pjacklam
* Fix Makefile.PL so that this module installs over the core version.
2016-12-03 v0.2609 pjacklam
* Use ExtUtils::MakeMaker rather than Module::Install in Makefile.PL
* Remove INSTALL file. The information is in the README file.
* Inform in the BUGS file that the file may not be up to date.
* Inform in the TODO file that the file may not be up to date.
* Update AUTHOR information in Math/BigRat.pm.
* Remove author information in LICENSE file.
* Update README file.
* Minor POD reformatting in lib/Math/BigRat.pm.
2016-11-15 v0.260805 pjacklam
* Standardize on using $LIB for the variable holding the class of the backend
library.
* Improve bmul() by doing _gcd() twice on smaller numbers rather than once on
larger numbers.
2016-04-25 v0.260804 pjacklam
* Revert the change to the blsft() and brsft() methods, which truncated the
input (and output) to integers. However, now convert the base to an object
only when the base isn't an object already. Also return NaN if any of the
three operands is a NaN.
* Overloaded 'int' should not modify it's argument.
* The first output argument from objectify() is the class name, so use the
variable name $class, not $self.
* In Makefile.PL, change "build_requires 'Test::More' => 0.47" to
"test_requires 'Test::More' => 0.47". Test::More is only needed for testing,
not for building.
2016-04-22 v0.260803 pjacklam
* Add methods bnan(), binf(), bzero(), and bone(). The old code was based on
an undocumented behaviour where the superclass made assumptions about the
subclass.
* Fix tests where ok() was used incorrectly, like ok($got, $expected).
* Remove "require Carp", since we have "use Carp" in the heading.
* Completly rewrite new(). It was buggy and hard to maintain.
* Add more descriptions to tests.
* Rename blog-mbr.t to author-blog-mbr.t.
* Simplify bsqrt() and blog(). Don't assume we know the internals of
Math::BigFloat objects.
* Change bmodpow() and bmodinv() so they handle all input arguments.
Non-integers are truncated to integers.
* Change internals of bnok().
* as_float() and numify() should not make assumptions about the internals of
Math::BigFloat objects.
* Wrap long lines.
* Fix typo in POD ("conversation" -> "conversion").
* Make internal functions _new_from_float() and _new_from_int() redundant and
remove them. They make assumtions about the internals of Math::BigFloat
objects and Math::BigInt objects, respectively.
* Make internal function _as_float() redundant and remove it.
* Add methods band(), bior(), bxor(), and bnot().
2015-12-28 v0.260802 pjacklam
* Fix blog(). The handling of inf and NaN was broken. It also returned
incorrect result in several cases, especially when both the operand and the
base were both integers. In some cases, the correct result was returned,
but the operand was not set to this value. An undefined base (indicating
that Euler's number e should be used) was not handled correctly.
* Update author information in Makefile.PL.
* Add tests for log() in t/bigratpm.inc as well as templates for the other
overloaded functions exp, sin, cos, atan2, int, abs, and sqrt.
* Update number of tests in t/bigratpm.t.
* Add test file t/blog-mbr.t.
* Reformat tests and add comments/descriptions to them.
* Accept both "Inf" and "Infinity", ignoring letter case, and letting the
sign be optional. This matches the current behaviour of core Perl.
* Internal clean-up of the copy() method.
* Remove all occurences of "require Carp", since we "use Carp".
* Reformat some of the code to make the code more readable (for me, at least)
and more in accordance with the guidelines in the "perlstyle" man page.
* Correct some errors in the comments in the code.
* Use "our ..." rather than "use vars ...".
* Rename variables so they have more descriptive names and are more in
accordance with the Math-BigInt distribution.
* Remove unused variables.
* Use "use lib 't'" rather than "unshift @INC, 't'".
* Include "use strict" and "use warnings" in all files.
2015-09-14 v0.260801 pjacklam
* Added support for bdiv() in list context. Added corresponding tests.
* Changed bmod() so the result corresponds to Perl's % operator, as well as
the second output argument of bdiv() in list contest. Modified tests
correspondingly. Now the behaviour of bmod() is consistent between
Math::BigInt, Math::BigFloat, and Math::BigRat.
* Clearer POD for the bdiv() and bmod() methods.
* Display more information about loaded modules.
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/>
```