This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: infinity != infinity
- From: amylaar at spamcop dot net (Joern Rennecke)
- To: paolo dot bonzini at polimi dot it (Paolo Bonzini)
- Cc: amylaar at spamcop dot net, weigand at i1 dot informatik dot uni-erlangen dot de, gcc at gcc dot gnu dot org, joern dot rennecke at superh dot com, schwab at suse dot de, dewar at gnat dot com (Robert Dewar)
- Date: Sat, 10 Jul 2004 12:04:31 +0100 (BST)
- Subject: Re: infinity != infinity
> > >Thus, two infinities with the same sign should compare unordered.
> >
Andreas Schwab:
> > The m68881 disagrees, and it is supposed to be IEEE compliant.
>
Paolo Bonzini:
> The 8087 (and all of it successors) did too, and it is where IEEE itself
> originated. GCC's fp-bit.c disagrees as well. I don't know of any
> processor that implements your scheme -- your analysis is sound, agreed.
Actually, there is a comment in fp-bit.c:__fpcmp_parts that says:
/* +inf > -inf, but +inf != +inf */
however, because __fpcmp_parts only returns a ternary value for
{ lt, eq, gt }, it can't return an appropriate value for unordered.