[Pdx-pm] Unexpected math result
Michael R
michael at jamhome.us
Wed Dec 21 11:31:58 PST 2011
(Disclaimer: cross post from perlmonks)
mikeraz at hive:~> perl -e 'my $x =
(.0425 * 2) + .0025; print $x - (.0425 * 2) - .0025, $/;'
2.16840434497101e-18
mikeraz at hive:~>
Silly me would expect something like 0 to be printed. Why the
2.16840434497101e-18? (OK, round it off and you have 0, but ....)
WT_?
--
Michael Rasmussen
http://www.jamhome.us/
Be Appropriate && Follow Your Curiosity
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/pdx-pm-list/attachments/20111221/dae77cef/attachment.html>
More information about the Pdx-pm-list
mailing list