[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk number to string bug
From: |
Andrew J. Schorr |
Subject: |
Re: gawk number to string bug |
Date: |
Wed, 28 Dec 2005 10:37:16 -0500 |
User-agent: |
Mutt/1.4.1i |
Oops, the last patch used the isfinite() function, but that should
probably be avoided, since it doesn't seem to be present on some
platforms (e.g. it's not in Solaris 8). Revised patch attached.
$ ./gawk --lint 'BEGIN {x = log(0); printf "x = %s %g %d %x\n",x,x,x,x}'
gawk: warning: [s]printf: value -inf is out of range for `%d' format
gawk: warning: [s]printf: value -inf is out of range for `%x' format
x = -inf -inf -inf -inf
$ ./gawk --lint 'BEGIN {x = sqrt(-1); printf "x = %s %g %d %x\n",x,x,x,x}'
gawk: warning: sqrt: called with negative argument -1
gawk: warning: [s]printf: value nan is out of range for `%d' format
gawk: warning: [s]printf: value nan is out of range for `%x' format
x = nan nan nan nan
I suspect we should add some test cases for these various formatting issues...
Regards,
Andy
gawk315.patch
Description: Text document
Re: gawk number to string bug, Aharon Robbins, 2005/12/24
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/26
- Re: gawk number to string bug, Paul Eggert, 2005/12/26
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/26
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/27
- Re: gawk number to string bug,
Andrew J. Schorr <=
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/28
- Re: gawk number to string bug, Eli Zaretskii, 2005/12/28
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/28
- Re: gawk number to string bug, Andrew J. Schorr, 2005/12/28