good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Re: Re: perls long number problemby gbarr (Monk) |
on Dec 10, 2001 at 21:24 UTC ( [id://130712]=note: print w/replies, xml ) | Need Help?? |
Perl can only handle integers up to the size it was configured with. But it can handle numbers larger that that. Try your example with
And you will see the number just fine. This is because perl uses doubles to hold real numbers, which can typically hold numbers of more bits. On most machines perl runs, integers are 32 bits and doubles use 53 bits for the mantissa. So yes, perl can handle larger numbers without strings, providing you don't convert them to integers
In Section
Seekers of Perl Wisdom
|
|