[PATCH] math: Merge strtod_nam_*.h into math-type-macros-*.h
Florian Weimer
fweimer@redhat.com
Tue May 15 18:22:00 GMT 2018
On 05/15/2018 05:04 PM, Joseph Myers wrote:
> On Sun, 13 May 2018, Florian Weimer wrote:
>
>> + SET_MANTISSA(flt, mant)
>> + Set the variable FLT of type FLOAT to the mantissa MANT. */
>
> It's specifically setting the *NaN payload* to MANT, not the value of the
> variable. SET_MANTISSA is using the ieee_nan union member, which
> separates the NaN payload bits from the quiet NaN bit.
>
> Given that it's specific to NaNs, and would do the wrong thing if you
> expected to be able to set the whole mantissa of other floating-point
> values, I don't think this should be called SET_MANTISSA in a
> non-NaN-specific header. What that indicates to me is renaming the macro
> to e.g. SET_NAN_MANTISSA or SET_NAN_PAYLOAD, and calling the
> math-mantissa-*.h headers something with "nan" in their name to reflect
> that they are specific to NaNs.
Okay. I thought that macro had a strange name, but it was probably okay
based on context, which is now gone.
I've made some further adjustments. I didn't do any binary diffing for
this one yet, only tested it on ppc64 (big endian) and x86-64, with no
test suite failures (except intl/gettext, but that's totally unrelated
and due to my locale settings).
Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: math-nan-payload.patch
Type: text/x-patch
Size: 15387 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20180515/aa299ad3/attachment.bin>
More information about the Libc-alpha
mailing list