[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk round-up 0.5 bug?
From: |
Hermann Peifer |
Subject: |
Re: gawk round-up 0.5 bug? |
Date: |
Tue, 23 Sep 2008 07:42:37 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Andreas Schwab <schwab <at> suse.de> writes:
>
> Since 0.5 is exactly half-way between 0 and 1 it is rounded to the
> nearest even number. This is the default rounding mode for IEEE
> floating point systems.
>
By the way...
address@hidden:~]> gawk 'BEGIN {printf("%.0f\n", 0.5)}'
1
address@hidden:~]> gawk --version|head -1
GNU Awk 3.1.6
address@hidden:~]> uname -a
CYGWIN_NT-5.1 LAPTOP7664 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin
Hermann
- Re: gawk round-up 0.5 bug?,
Hermann Peifer <=