summaryrefslogtreecommitdiff
path: root/dist/Math-BigRat
Commit message (Collapse)AuthorAgeFilesLines
* [perl #95530] BigRat int(-1/2) == 0Father Chrysostomos2011-08-222-3/+11
| | | | | | | | Math::BigRat was trying to copy the sign of a BigRat object into a BigInt object when converting to an integer, but without taking into account that the number might be rounded toward zero. This resulted in a 0 BigInt with a negative sign, which is not actually a valid BigInt object, as it does not support negative zero.
* Synchronise Math::BigRat with CPANFlorian Ragwitz2011-07-091-1/+1
|
* Bumped Math-BigInt, Math-BigInt-FastCalc and Math-BigRat versions for ↵Jesse Vincent2011-01-201-1/+1
| | | | release per cmpVERSION.pl
* [perl #82098] Fix RT 61543 and remaining part of RT 63237Peter John Acklam2011-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Extend bmodpow() to handle negative numbers. - dist/Math-BigInt/lib/Math/BigInt.pm: Fix bmodpow() code and make the documentation style more like that of other methods. - dist/Math-BigInt/t/bigintpm.inc: Edit test results so they match new behaviour, i.e., where earlier a NaN was returned, there are now some cases where an integer is returned, since bmodpow() now also handles negative numbers. Also include test cases from RT 63237. The tests themselves have all been verified to be correct using other software. - dist/Math-BigRat/t/bigratpm.inc: Fix test case so it matches the new behaviour of Math::BigInt->bmodinv(). Math::BigRat->bmodinv() only handles integers, and is essentially just a front-end to Math::BigInt->bmodinv(). - dist/Math-BigInt/t/bare_mbi.t: Increment test count. - dist/Math-BigInt/t/bigintpm.t: Increment test count. - dist/Math-BigInt/t/sub_mbi.t: Increment test count.
* Fix typos (spelling errors) in dist/*Peter J. Acklam) (via RT2011-01-073-6/+6
| | | | | | | | | # New Ticket Created by (Peter J. Acklam) # Please include the string: [perl #81888] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81888 > Signed-off-by: Abigail <abigail@abigail.be>
* [perl #81400] Fix bmodinv() part of RT 63237Peter John Acklam2011-01-021-1/+1
| | | | | | | | | | | | | | | | | The following standard definition is used: z is the modular inverse of x (mod y) if and only if x*z (mod y) = 1 (mod y). - dist/Math-BigInt/lib/Math/BigInt.pm: Fix the code in bmodinv() so it can handle negative arguments. The code can be optimized further for speed, but correctnes first. - dist/Math-BigInt/t/bigintpm.inc: Fix the test case for modinv(-3, -5). The output should be -3, since -3 * -3 (mod -5) = -9 (mod -5) = -4, and 1 (mod -5) = -4. - dist/Math-BigRat/t/bigratpm.inc: Fix same test case as above. Math::BigRat::bmodinv() only handles integers, and is essentially just a front-end to Math::BigInt::bmodinv().
* Bump Math::BigRat to dev release as per Florian's requestChris 'BinGOs' Williams2010-11-191-1/+1
|
* Disable bitwise operatorsFlorian Ragwitz2010-11-092-1/+26
| | | | | | Some of them used to return wrong results, others just failed horribly. We're disabling them alltogether, with a useful error message, until maybe someone figures out how to make them DWIM.
* Math::BigRat has blead as its upstreamFlorian Ragwitz2010-10-2414-0/+5419