in reply to Rounding a number using (s)printf

0.255 and 1.255 are not exactly representable in base-2 floating point:
$ perl -we 'printf "%.20f\n", 0.255' 0.25500000000000000444 $ perl -we 'printf "%.20f\n", 1.255' 1.25499999999999989342
when the internal represenations of these two numbers are then rounded to 2 decimal places, one rounds up, the other down.

Dave.