This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/RFA] Fix varobj.c value comparison problems


> Mark Kettenis <kettenis@gnu.org> wrote:
>> Andrew Cagney <cagney@gnu.org> wrote:
>> Mark, the thing that's missing is an automated testcase.  Having
>> something change from -0.0 to +0.0 should do it.
>
> Ah, but that is the exact the opposite of what triggered this fix:
>
>   NaN != NaN
>
> even though the bit pattern is the same, whereas
>
>   -0.0 == +0.0

Don't know where the notion of -0.0 == +0.0 is derived from, as they
clearly express different semantics:

 1/-0.0 => -inf
 1/+0.0 => +inf

Therefore clearly aren't equivalent; although +0.0 == abs(-0.0) is.

Nor correspondingly, is it sensible that Nan != NaN; as regardless of
their indeterminate respective values, they express equivalent semantics.

Apparently, a few of the bits of wisdom brought to us by committees.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]