[cfp-interest 3662] Re: ISO 60559 6.3 and C2Y F3.3#7
Fred J. Tydeman
tydeman at tybor.com
Thu Oct 16 06:04:49 PDT 2025
On Thu, 16 Oct 2025 19:23:20 +1100 (AEDT) Damian McGuckin wrote:
>
>
>The former says
>
> When either an input or result is a NaN, this standard does not
> interpret the sign of a NaN.
>
>The latter qualifies this with
>
> ... NaNs whose sign bit is not generally interpreted by
> ISO/IEC 60559
>
>The former uses "not interpret".
>
>So should "generally" be deleted in C2Y or is generally meant to handle those cases where a NaN is neither input nor
>result?
I believe that copysign is one function that cares about the
sign of the input NaN. And also an output NaN.
Assuming NAN is the same as +NAN:
copysign( NAN, -1.0 ) should end up as -NAN
copysign( 1.0, -NAN ) should end up as -1.0
---
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