bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Overflow to Infinity


From: Eli Zaretskii
Subject: Re: [bug-gawk] Overflow to Infinity
Date: Sun, 15 Jul 2018 17:46:02 +0300

> From: address@hidden
> Date: Sun, 15 Jul 2018 00:32:03 -0600
> Cc: address@hidden, address@hidden,
>         address@hidden
> 
> > I don't understand what do you mean by "like C doubles for the regular
> > comparison operators".  I can tell what I was talking about: the fact
> > that _any_ comparison with a NaN always yields zero (a.k.a. "false").
> > So a < NaN => false, but also a >= NaN => false, and NaN == NaN => false. 
> 
> 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?

> > How can this make sense?
> 
> It clearly made sense to the IEEE guys; something that isn't a number
> can't be meaningfully compared to one, which is why all the other
> operators return false.

Including equality to itself??

> (I'm not qualified to judge if having NaN
> in the hardware makes intrinsic sense. But I am stuck with users who
> expect numeric comparisons to behave in a specific fashion.)

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.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]