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.
In reply to Re: Rounding a number using (s)printf
by dave_the_m
in thread Rounding a number using (s)printf
by the_slycer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |