in reply to Rounding a number using (s)printf
when the internal represenations of these two numbers are then rounded to 2 decimal places, one rounds up, the other down.$ perl -we 'printf "%.20f\n", 0.255' 0.25500000000000000444 $ perl -we 'printf "%.20f\n", 1.255' 1.25499999999999989342
Dave.
|
|---|