develooper Front page | perl.perl5.porters | Postings from April 2014

[perl #121668] [PATCH] Fix RT #62052: Math::BigFloat -> bdiv() in list context

Thread Previous
From:
perlbug-followup
Date:
April 15, 2014 21:12
Subject:
[perl #121668] [PATCH] Fix RT #62052: Math::BigFloat -> bdiv() in list context
Message ID:
rt-4.0.18-10772-1397596344-1603.121668-75-0@perl.org
# New Ticket Created by  (Peter J. Acklam) 
# Please include the string:  [perl #121668]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=121668 >


Fix RT #62052: Math::BigFloat -> bdiv() in list context

In list context, Math::BigFloat -> bdiv() returns the quotient and remainder.
By convention, this means that the quotient and remainder, q and r, after
dividing x by y, satisfies x = q*y + r. The current behaviour is to return x/y
and r, which do not satisfy this relation, and - more importantly - is not what
people expect.

dist/Math-BigInt/lib/Math/BigFloat.pm: Patched to fix this bug.

t/bigfltpm.inc and t/upgrade.inc: Fixed test cases to match the new behaviour.
Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About