Skip Menu |
 

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

Report information
The Basics
Id: 25275
Status: rejected
Worked: 45 min
Priority: 0/
Queue: Math-BigInt

People
Owner: TELS [...] cpan.org
Requestors: nospam-abuse [...] bloodgate.com
Cc:
AdminCc:

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



Subject: [perl #41204] BigRat ->numify gives wrong answer with Calc/FastCalc backend
Download (untitled) / with headers
text/plain 199b
This bugs is to track the following issue: [perl #41204] BigRat ->numify gives wrong answer with Calc/FastCalc backend http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2007-01/msg00185.html
Download (untitled) / with headers
text/plain 701b
This issue is not a bug in Math::BigRat or the libraries (Math::BigInt::Calc, Math::BigInt::FastCalc, ...). This has to do with how the Perl core deals with numerical scalars. 2^70 is exactly 1180591620717411303424, but look at this: $ perl -we 'printf "%.0f\n", 0 + "1180591620717411303424"' 1180591620717411172352 $ perl -we 'printf "%.0f\n", 2 ** 70' 1180591620717411303424 $ perl -we 'printf "%.0f\n", "-" . (0 + "1180591620717411303424")' -1180591620717409992704 In all three cases, the number is +/-2^70, but still I get three different absolute values (my perl is built with 64 bit integer support but no support for long doubles). You are expecting higher precision than Perl can give you.


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.