Skip Menu |

This queue is for tickets about the Math-BigInt CPAN distribution.

Report information
The Basics
Id: 124790
Status: resolved
Priority: 0/
Queue: Math-BigInt

People
Owner: Nobody in particular
Requestors: peter.john.acklam [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.999812



Subject: Accuracy and precision are both set in some cases
The following code causes both the precision and the accuracy to be set, which is illegal, so $x becomes NaN, not 5. In addition, the returned precision and accuracy are the class variables, not the instance variables set via new(). ===BEGIN-CODE=== use Math::BigInt; # set class variable Math::BigInt->precision(-4); # specify accuracy to the constructor my $x = Math::BigInt->new(5, 3, undef); say "x = ", $x; say "a = ", $x->accuracy() // "undef"; say "p = ", $x->precision() // "undef"; ===END-CODE=== The output is x = NaN a = undef p = -4 but should have been x = 5 a = 3 p = undef This bug is present in all versions of Math::BigInt.