[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Overflow to Infinity
From: |
arnold |
Subject: |
Re: [bug-gawk] Overflow to Infinity |
Date: |
Mon, 16 Jul 2018 00:51:06 -0600 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
Hi Eli.
> > Except for !=, where the result is true when one side is a NaN.
>
> If we allow one deviation, why not allow more? How about NaN == NaN?
I wasn't clear. In hardware, all comparisons against NaN return
false, except for != which returns true. (Even for NaN != NaN, which
is weird.)
> I think this tendency of having Gawk behave like the underlying C is a
> bad idea. But I already said similar things in the past and got voted
> down. So I think I will stop arguing here.
The problem isn't just that gawk differs from C. It's that gawk currently
gives very strange results, period. This is easy to demonstrate.
Compile the attached gen-float-table.c program and save its output
to hw-out.txt. Run the attached gen-table.awk program with the
latest *released* gawk, and save its output to gawk-out.txt.
Compare the two .txt files side by side in a diff viewer, such as
meld on Linux. Not only is gawk's output different from C's but it
is also nonsensical in several cases. This is a direct consequence
of using the array index ordering routine for scalar comparisons.
Making gawk's output like C's will give us something that is approximately
sane.
And, as you say, we've beaten this to death now.
Thanks,
Arnold
gen-float-table.c
Description: Binary data
gen-table.awk
Description: Text document
- Re: [bug-gawk] Overflow to Infinity, (continued)
- Re: [bug-gawk] Overflow to Infinity, Andrew J. Schorr, 2018/07/06
- Re: [bug-gawk] Overflow to Infinity, Arnold Robbins, 2018/07/13
- Re: [bug-gawk] Overflow to Infinity, Eli Zaretskii, 2018/07/13
- Re: [bug-gawk] Overflow to Infinity, arnold, 2018/07/13
- Re: [bug-gawk] Overflow to Infinity, Eli Zaretskii, 2018/07/13
- Re: [bug-gawk] Overflow to Infinity, arnold, 2018/07/15
- Re: [bug-gawk] Overflow to Infinity, Eli Zaretskii, 2018/07/15
- Re: [bug-gawk] Overflow to Infinity,
arnold <=
- Re: [bug-gawk] Overflow to Infinity, Eli Zaretskii, 2018/07/16
- Re: [bug-gawk] Overflow to Infinity, arnold, 2018/07/16
- Re: [bug-gawk] Overflow to Infinity, Eli Zaretskii, 2018/07/16
- Re: [bug-gawk] Overflow to Infinity, arnold, 2018/07/16
- Re: [bug-gawk] Overflow to Infinity, Eli Zaretskii, 2018/07/17
- Re: [bug-gawk] Overflow to Infinity, arnold, 2018/07/19
- Re: [bug-gawk] Overflow to Infinity, Eli Zaretskii, 2018/07/19
- Re: [bug-gawk] Overflow to Infinity, Eli Zaretskii, 2018/07/21
- Re: [bug-gawk] Overflow to Infinity, Andrew J. Schorr, 2018/07/16
- Re: [bug-gawk] Overflow to Infinity, Eli Zaretskii, 2018/07/16