[Cfp-interest 1931] Re: action item: suggest wording for hypot

Jim Thomas jaswthomas at sbcglobal.net
Fri Feb 19 20:55:53 PST 2021


F.10 says

[13] Functions with a NaN argument return a NaN result and raise no floating-point exception, except where explicitly stated otherwise.

-Jim Thomas

> On Feb 18, 2021, at 11:01 PM, Paul Zimmermann <Paul.Zimmermann at inria.fr> wrote:
> 
>       David,
> 
> with that change, is the value of hypot(NaN, +-0) specified somewhere?
> 
> Best regards,
> Paul
> 
>> Date: Thu, 18 Feb 2021 18:07:33 -0800 (PST)
>> From: David Hough CFP  <pcfp at oakapple.net>
>> 
>> 
>> Draft C23 F.10.4.4 says
>> 
>> --- hypot(x, y), hypot(y, x), and hypot(x, -y) are equivalent.
>> --- hypot(x, +-0) is equivalent to fabs(x).
>> --- hypot(+-inf, y) returns +inf, even if y is a NaN.
>> 
>> Suggestion:
>> 
>> Change the middle bullet to:
>> 
>> --- hypot(x, +-0) returns the absolute value of x, when x is not a NaN
>> 
>> Note that "when x is not a NaN" is equivalent to "when x is a number".
>> 
>> But "when x is not a NaN" shows up twice in n2596, in F.10.10.1 for fma,
>> and F.10.13.1 getpayload.
>> _______________________________________________
>> Cfp-interest mailing list
>> Cfp-interest at oakapple.net
>> http://mailman.oakapple.net/mailman/listinfo/cfp-interest
>> 
> _______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest



More information about the Cfp-interest mailing list