in reply to Re^2: Rounding problem with sprintf??
in thread Rounding problem with sprintf??
But again, the root 'bug' is in floating point, which cannot exactly represent the numbers you give. See What Every Computer Scientist Should Know About Floating-Point Arithmetic.
c:\@Work\Perl>perl -wMstrict -le "for my $f (5.245, 9.325) { print sprintf '%.20f', $f; } " 5.24500000000000010000 9.32499999999999930000
Update: Slight cosmetic change to code example.
|
|---|