[Cfp-interest 2322] Re: infinity and exceptions

Damian McGuckin damianm at esi.com.au
Thu Jan 13 19:22:00 PST 2022


On Thu, 13 Jan 2022, Fred J. Tydeman wrote:

>> Infinity does not propagate. A result may be an infinity, but
>> not always, e.g. 1 / +inf = +0, and the sign may be different:
>> 0 - +inf = -inf.
>>
>>> I do not see any place in the C standard that the use of
>>> INFINITY shall be quiet (in most cases).  One exception is
>>> INFINITY / INFINITY (which raises invalid)..
>>
>> and 0 * INFINITY.
>>
>
> OK.  Wrong way to solve the problem I see.

I am unsure of what you mean there.

> How about adding to 5.2.4.2.2 #16 and #17:
> 16: The evaluation of INFINITY does not raise any FP exceptions.
> 17: The evaluation of NAN does not raise any FP exceptions.

Yes. But then again, how do you evaluate NAN? You can assign it.


More information about the Cfp-interest mailing list