[Cfp-interest 3205] Re: Various Updates to Annex F+G
Damian McGuckin
damianm at esi.com.au
Wed Aug 14 20:02:39 PDT 2024
On Thu, 15 Aug 2024, Damian McGuckin wrote:
> Nowhere is the concept of normative text defined or discussed.
>
> With regard to F.10.1#14
>
> Functions with a NaN argument return a NaN result and raise no
> floating-point exception, except where explicitly stated otherwise.
>
> I would dearly love to add the word 'single' before that NaN.
I personal would normally expect that the normal behaviour if given a
NaN as one of several argument, one may or may not get a NaN returned.
Indeed, hypot() does not always do that.
In some of my own programs which model physics, depending on the other
parameters, I may take branches which never need to access that argument
which is a NaN.
So, in my own limited cases, I would only assume normative behaviour for
a case like
x = f(NaN)
would yield a result which is x.
The standard assumes normative behaviour of F.10.1#14 for
frexp(NaN, p)
where 'p' is a pointer to an integer. I find that very abnormal
personally but that is a highly subjective opinion. I have used
'hypot' probably 100 times more than I have ever used 'frexp'.
Thanks - Damian
More information about the Cfp-interest
mailing list