|laziness, impatience, and hubris|
Re: Using (s)printf()by Anonymous Monk
|on Aug 31, 2001 at 16:05 UTC||Need Help??|
I tried to use the example given in the text. This is what I get (using perl v5.6.1 built for cygwin): printf("%.2f", 9.333333);
This prints "9.33". Actually, this is what I expect, but the article says it should be 9.34.
If I try the following:
I get 9.6, which is OK, but if I try
I get 43.5, which is rounded the wrong way.
Can someone explain this? (Please send me an email (email@example.com)).