[Cfp-interest] NaNQ, NaNS

Jim Thomas jaswthomas at sbcglobal.net
Mon Aug 27 10:59:12 PDT 2018


754 5.12.1 also says

Language standards should provide an optional conversion of NaNs in a supported format to external character sequences which appends to the basic NaN character sequences a suffix that can represent the NaN payload (see 6.2). The form and interpretation of the payload suffix is language-defined. The language standard shall require that any such optional output sequences be accepted as input in conversion of external character sequences to supported formats.

This might not be relevant to Rajan’s proposal (email today).

- Jim Thomas

> On Jul 26, 2018, at 4:38 PM, Fred J. Tydeman <tydeman at tybor.com> wrote:
> 
> On Wed, 25 Jul 2018 11:24:55 -0500 Rajan Bhakta wrote:
>> 
>>     NaNQ/NaNS proposal:
>> 
>>       Look at current 754 draft to see if NaNQ/NaNS violates it.
>> 
> 754: 5.12.1: 
> Conversion of a quiet NaN in a supported format to an external character sequence shall produce a
> language-defined one of "nan" or a sequence that is equivalent except for case (e.g., "NaN"), with an
> optional preceding sign. (This standard does not interpret the sign of a NaN.)
> 
> Conversion of a signaling NaN in a supported format to an external character sequence should produce a
> language-defined one of "snan" or "nan" or a sequence that is equivalent except for case, with an optional
> preceding sign. If the conversion of a signaling NaN produces "nan" or a sequence that is equivalent except
> for case, with an optional preceding sign, then the invalid operation exception should be signaled.
> 
> 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.
> 
> 
> Since the above is 'should', not 'shall', NaNS is allowed by 754.
> However, NaNQ is not allowed.
> 
> C99/C11/C17 allow for NaN(Q) and NaN(S), but not NaNQ and NaNS.
> 
> 
> ---
> Fred J. Tydeman        Tydeman Consulting
> tydeman at tybor.com      Testing, numerics, programming
> +1 (702) 608-6093      Vice-chair of PL22.11 (ANSI "C")
> Sample C99+FPCE tests: http://www.tybor.com
> Savers sleep well, investors eat well, spenders work forever.
> 
> _______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20180827/d9968e91/attachment.html 


More information about the Cfp-interest mailing list