This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC/RFA] Fix varobj.c value comparison problems
- From: Paul Schlie <schlie at comcast dot net>
- To: Andrew Cagney <cagney at gnu dot org>,Mark Kettenis <kettenis at gnu dot org>,<gdb-patches at sources dot redhat dot com>
- Date: Sun, 20 Feb 2005 00:51:45 -0500
- Subject: 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.