P is for Practical | |
PerlMonks |
Stringification of FP numbers.by gam3 (Curate) |
on Jun 12, 2009 at 15:54 UTC ( [id://771006]=perlquestion: print w/replies, xml ) | Need Help?? |
gam3 has asked for the wisdom of the Perl Monks concerning the following question:
Can anyone explain to me why 0.0001 is stringified as "0.0001" but 0.00001 is stringified as "1e-05"?
This would make sense if "100000.0" was printed as 1e05, but is seems negative exponents are treated in a different and rather arbitrary way.
-- gam3 A picture is worth a thousand words, but takes 200K.
Back to
Seekers of Perl Wisdom
|
|