[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Awk cannot properly deal with too small numbers.
From: |
Luuk |
Subject: |
Re: [bug-gawk] Awk cannot properly deal with too small numbers. |
Date: |
Sat, 16 Apr 2016 10:38:27 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
On 15-04-16 02:21, Wolfgang Laun wrote:
Note that this works:
$ echo 1.1e-309 | awk '$1+0 < 0.05{ print $1;}'
1.1e-309
Because of this
$ echo 1.1e-309 | awk '$1 < 2.05{ print $1;}'
1.1e-309
and similar experiments I'd call the difference in behaviour surprising.
$ echo 1.1e-309 | awk '{ print $1, $1+0, $1+0<0.05, $1<2.05;}'
1.1e-309 0 1 1
$1+0 equesl 0, which is smaller than 0.05
'1.1e-309' seems to be smaller than 2.05 also ....
but nothing surprising here....
Re: [bug-gawk] Awk cannot properly deal with too small numbers., arnold, 2016/04/16