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

Owner: Nobody in particular
Requestors: peter.john.acklam [...]

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

Subject: Accuracy and precision are both set in some cases
Download (untitled) / with headers
text/plain 652b
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.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to