http://www.perlmonks.org?node_id=1049636


in reply to Re^3: How to calculate the sum of columns to be equal to 100?
in thread How to calculate the sum of columns to be equal to 100?

I read it originally in the documentation of the standard C library. You can certainly find the IEEE standard on this.

Strangely, your "trick" with the format does not work for me on 5.14.2:

$ perl -wE 'printf qq[%9f\t%.0f\t%2.0f\n], ($_ + 0.5) x 3 for 0 .. 10; +' 0.500000 0 0 1.500000 2 2 2.500000 2 2 3.500000 4 4 4.500000 4 4 5.500000 6 6 6.500000 6 6 7.500000 8 8 8.500000 8 8 9.500000 10 10 10.500000 10 10