|
From: | Wolfgang Laun |
Subject: | Re: [bug-gawk] Awk cannot properly deal with too small numbers. |
Date: | Fri, 15 Apr 2016 02:21:12 +0200 |
You're hitting the limits of double precision floating point ... perhaps awk could issue a warning when your "out of bounds" string is coerced into a number that becomes zero, but I'm guessing the community will vote no.On Thu, Apr 14, 2016 at 9:44 AM, Zhengyu Guo <address@hidden> wrote:Hi,I encountered a problem when dealing with very small numbers. The test case this shown below~~~$ echo 1.1e-307 | awk '$1<0.05{print}'1.1e-307$ echo 1.1e-309 | awk '$1<0.05{print}’~~~Both commands should print out the input number. However, the second command print out nothing.It seems that when the numeric number is too small, AWK cannot process it correctly.Thanks!
[Prev in Thread] | Current Thread | [Next in Thread] |