[cfp-interest 3433] Re: sign bit of a NaN
Damian McGuckin
damianm at esi.com.au
Sun Apr 13 21:02:03 PDT 2025
On Sun, 13 Apr 2025, Jim Thomas wrote:
> The cproj case is interesting because the sign in a non-NAN result
> depends on the sign bit of a NaN in the input. Thus the sign in the
> result is unspecified in this case. This could be avoided by requiring
> the now unspecified sign in the cproj result to be positive in this
> case. But I don?t think that would be worth breaking existing
> implementations or the performance hit. I think it would be better to
> leave the sign unspecified: a natural consequence following from the
> bit-level definition of copysign.
I agree.
According to some with an interest in low level behaviour, even hardware
related interest, the Clang behaviour is expected, the GCC behaviour not.
Interesting. I will solicit some other opinions.
Thanks - Damian
More information about the cfp-interest
mailing list