[cfp-interest 3900] Re: convertFrom and signaling NaNs
Jan Schultke
janschultke at googlemail.com
Fri Apr 17 21:57:22 PDT 2026
>
> I had a look in
>
>
> https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3938r1.html
>
> But I do not have time to review it before your meeting next week.
>
> One thing jumped out at me however:
>
> The value of a floating-point-literal never has negative sign bit.
>
> A value can only be positive or negative. That said, at least in C, the
> negative sign in front of say
>
> 1234.5678
>
> is not part of the definition of a literal so that mathematically, a
> literal in C, is always a positive number although because
>
> 0.0
>
> is a literal, a literal is not always strictly positive.
Thanks for taking a look. It works the same way in C++, so the leading
minus is not part of the literal itself. However, that in itself doesn't
seem to mandate anything about whether the literal "0.0" has a positive
sign bit or negative sign bit. Both implementation choices seemingly comply
with the wording, producing a value that is mathematically zero and which
exactly equals the scaled value of the literal before rounding.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20260418/025090c7/attachment.htm>
More information about the cfp-interest
mailing list