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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to calculate the sum of columns to be equal to 100?
by Athanasius (Archbishop) on Aug 16, 2013 at 02:27 UTC |