This is the mail archive of the
`gcc@gcc.gnu.org`
mailing list for the GCC 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] |

*From*: amylaar at spamcop dot net (Joern Rennecke)*To*: weigand at i1 dot informatik dot uni-erlangen dot de (Ulrich Weigand)*Cc*: joern dot rennecke at superh dot com, amylaar at spamcop dot net, schwab at suse dot de, gcc at gcc dot gnu dot org*Date*: Sat, 10 Jul 2004 06:27:26 +0100 (BST)*Subject*: Re: infinity != infinity

> The standard is apparently less than explicit on this particular point. > But e.g. http://compilers.iecc.com/comparch/article/98-07-108 > says the intent was that infinity was supposed to compare equal with > itself: > > > To remove doubt as to the intent: In an implementation guide to a draft > > version of the standard, Coonen [_Computer_, 13: 1, p. 78] gives a table > > which clearly shows that +oo = +oo and -oo = -oo are to be TRUE. But the question remains, was this derived from his note of the standards commitee meetings, or from his personal interpretation of the standard (or maybe even his preconception of what it should be) ? > and > > > The standard states that > > Infinity arithmetic shall be construed as the limiting case of real > > arithmetic with operands of arbitrarily large magnitude, when such a > > limit exists. Infinities shall be interpreted in the affine sense, that is, > > -oo < (every finite number) < +oo. > > This *seems* to make it clear that the infinities of the standard represent > > the two improper elements of the extended real number system. And > > although many mathematicians may warn that +oo is not actually a > > number, they should still agree that +oo = +oo is TRUE in the extended > > real number system. I can't follow that reading. The results you get by applying the limit operator are different from using extended reals. > The current draft of the upcoming revision to 754 makes the latter point > more explicit: > > "The mathematical standard underpinning the arithmetic in this standard > is the extended reals [...]." I missed the significance of this bit. There is a contradiction in the standard then. > Now there are apparently other opinions as well as to how to interpret > the standard on this point, and I'm not sure who has the definite answer. > But why should we now deviate from existing behaviour in hardware > implementations (and GCC implementation up to now)? I am implementing some software floating point functions, and found that I got testuite regressions that I traced down to the interpretation of the standard. I didn't want to add a bug to my implementtion just to match a pervious bug in some preceding implementations. But it appears that there is an issue with the standard itself. Mind you, it'd certainly is a whole less hassle if the standard actually mandated +oo == +oo && -oo == -oo, even though it is inconsistent. It seems like it would be a good idea to ask the current working group for a clarification; however, when I tried to to follow the instructions at http://grouper.ieee.org/groups/754/revision.html#mailing-list , I got only errors from majordomo (unknown list 'stds-754', Command 'lists' not recognized.)

**Follow-Ups**:**Re: infinity != infinity***From:*Andreas Schwab

**References**:**Re: infinity != infinity***From:*Ulrich Weigand

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |