[Cfp-interest 3297] Re: N3288 (Give consistent wording for SNAN initialization)

Jim Thomas jaswthomas at sbcglobal.net
Wed Oct 2 14:57:35 PDT 2024



> On Oct 2, 2024, at 12:15 PM, Fred J. Tydeman <tydeman at tybor.com> wrote:
> 
> On Mon, 30 Sep 2024 12:47:53 -0700 Jim Thomas wrote:
>> 
>> 2. If the standard says "evaluated at translation time" is it clear that the reference is to semantics and not a possible optimization?
>> 
>> E.g. For
>> 
>> #pragma STDC FENV_ACCESS OFF
>> auto double x = SNAN;
>> 
>> The evaluation of SNAN is semantically runtime, but could be done at translation time as an optimization because of the pragma. However, the (semantically runtime) evaluation of SNAN results in a quiet NaN regardless of when the implementation evaluates it.
>> 
>> - Jim Thomas
>> 
> 
> C2y N3301 F.3#4 (along with footnote 424) says a QNAN is not required
> (If I am reading it correctly).

I agree. 

I think the same argument applies for implementations that define assignment to be by convertFormat. 

- Jim Thomas

> 
> 
> ---
> Fred J. Tydeman        Tydeman Consulting
> tydeman at tybor.com      Testing, numerics, programming
> +1 (702) 608-6093      Vice-chair of INCITS/C (ANSI "C")
> Sample C17+FPCE tests: http://www.tybor.com
> Savers sleep well, investors eat well, spenders work forever.




More information about the Cfp-interest mailing list