[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (possible) bug submission for gawk
From: |
Paul Jarc |
Subject: |
Re: (possible) bug submission for gawk |
Date: |
Fri, 03 Nov 2006 14:04:53 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) |
"Black Passion" <address@hidden> wrote:
> address@hidden gawk-3.1.5]$ echo 111111111.123456789 | ./gawk '{printf
> "%.4f",$1}'; echo
> 111111111.1235
This happens because "%.4f" means that the number should be *rounded*
to 4 decimal places, not *truncated*. .1235 is numerically closer to
your input number than .1234.
paul