[cfp-interest 3445] Re: [[reproducible]] EXAMPLE 3 in 6.7.13.8

Jim Thomas jaswthomas at sbcglobal.net
Thu Apr 17 15:24:58 PDT 2025


This matter was on the updated agenda for the CFP meeting this week but we didn’t get to it. We will carry it over to the 12 May CFP meeting and come up with a recommendation. JeanHeyd, is that suitable?

- Jim Thomas

> On Apr 17, 2025, at 8:31 AM, JeanHeyd Meneide <phdofthehouse at gmail.com> wrote:
> 
> On Mon, Apr 14, 2025 Jim Thomas <jaswthomas at sbcglobal.net <mailto:jaswthomas at sbcglobal.net>> wrote:
>> ...
>> 
>> The function could be written so that it doesn’t change the flags, e.g. with
>> 
>> #pragma STDC FP_CONTRACT OFF
>> #pragma STDC FENV_ACCESS ON
>> fenv_t save_env;
>> double d;
>> fegetenv(&save_env);
>> fesetenv(FE_DFL_ENV);
>> double d = sqrt(x[0]*x[0] + x[1]*x[1]);
>> fesetenv(&save_env);
>> return d;
>> 
>> Of course that would mean the function wouldn’t report floating-point exceptions.
>> 
>> (TS 18661-5 has #pragma STDC FENV_EXCEPT FE_ALL_EXCEPT NO_FLAG which means functions inside don’t set flags.)
> 
>      Is it okay if I made this change editorially to the example code, with CFP's approval? As it's an example and non-normative, I imagine everyone would prefer it's strictly correct according to the specification. But I'm also okay with a paper (if someone wants to take on that kind of burden.)
> 
> Sincerely,
> JeanHeyd
> _______________________________________________
> 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/20250417/945eaad2/attachment.htm>


More information about the cfp-interest mailing list