[Cfp-interest] AI about C support for "snan" character sequences

Jim Thomas jaswthomas at sbcglobal.net
Wed Oct 10 15:36:12 PDT 2018



> On Oct 10, 2018, at 12:08 AM, Mike Cowlishaw <mfc at speleotrove.com> wrote:
> 
> 
>  
>>>     All: Consider the fact that C doesn't support the SNaN sequence that IEEE does. Can have strtod take it as input.
>>> <!--[endif]-->
>> 
>> 
>> IEEE 754 5.12.1 says
>> 
>>> Conversion of an external character sequence “snan” (regardless of case) with an optional preceding sign, to a supported format should either produce a signaling NaN or else produce a quiet NaN and signal the invalid operation exception.
>>> 
>> I think as written it is a recommendation to do one or the other, but not a requirement to do either. Is this what the 754 committee intended?
>>  
> I believe it was ...that's the first use of Should in that subclause.
>  
> Mike

That would mean C FP does not need to recognize “snan” character sequences in order to support 754.

Jim Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20181010/6b23c456/attachment-0001.html 


More information about the Cfp-interest mailing list