Perl: the Markov chain saw | |
PerlMonks |
Math With Big Numbersby AlligatorStamp (Initiate) |
on Feb 14, 2019 at 20:32 UTC ( [id://1229917]=perlquestion: print w/replies, xml ) | Need Help?? |
AlligatorStamp has asked for the wisdom of the Perl Monks concerning the following question: Hello. I am having trouble getting Perl to give me correct answers with large numbers. I am using Perl 5.14.2 on Windows. 6^25 = 28430288029929701376. When I run the following:
I get 28430288029929701000. Assuming that this lack of accuracy was due to 32-bit Perl's trouble with numbers above 2^53, I tried the following:
which gives me 28430288029929700000 I don't understand why BigInt is giving me an even less accurate answer.
Back to
Seekers of Perl Wisdom
|
|