This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Improves __ieee754_exp() performance by greater than 5x on sparc/x86.
On Thu, 26 Oct 2017, Joseph Myers wrote:
> Unless a particular constant, table etc. is needed in the code both as
> integers and as double, just define it as double and initialize with a C99
> hex float constant, without involving unions at all. This certainly
> applies to some of your constants, possibly all of them.
To be clear: all my past and present comments about hex floats always mean
C99 0x1.2p3 and similar constants. Never hex integer values with a union
as in this patch. You should never, anywhere in glibc, have any occasion
to initialize a floating-point constant via specifying the integer values
of its representation (except in testcases for special ldbl-96 and
ldbl-128ibm representations). Proper hex floating-point constants are
always better.
--
Joseph S. Myers
joseph@codesourcery.com