[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Numeric Error that is also present in UNIX awk/nawk
From: |
Paul Eggert |
Subject: |
Re: Numeric Error that is also present in UNIX awk/nawk |
Date: |
Tue, 04 Oct 2005 13:48:10 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
"Saxon Robert-QA2183" <address@hidden> writes:
> The following generates the wrong number:
>
> * gawk 'BEGIN { print int(16.240*1000); exit }'
Gawk uses floating point internally, and you cannot expect output to
always be exact. There's no "wrong number" here; the result might be
16239 if that's the way the cookie crumbled.