Looks like your standard floating point inaccuracies to me. Try
$num1 = 12e-4; $num2 = 1.2e-3; printf("%.18g\n", $num1); printf("%.18g\n", $num2);
(Sorry, I can't call a scalar that's meant to hold a numeric value "string" anything)
Remember that something somewhere has to do the computation to turn that scientific notation into a real number and that any computation involving floating point numbers is sure to have precision problems.
In reply to Re: bug in Perl compilation?
by duff
in thread bug in Perl compilation?
by bkgallo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |