This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improves __ieee754_exp() performance by greater than 5x on sparc/x86.


On 10/26/2017 12:25 PM, Joseph Myers wrote:
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.

I was following the hex pattern used in sysdeps/ieee754/dbl-64/uexp.tbl

To be sure I'm understanding your comment correctly, you are
recommending I change from the union form of the hex constants
to 0x1.23p3 form of the constants and resubmit the patch.
That would reduce the chance of errors in any future updates
of constant values.
Is that correct?

- patrick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]