faster expf128

Joseph Myers
Wed Jun 24 17:39:10 GMT 2020

On Wed, 24 Jun 2020, Paul Zimmermann wrote:

> I forgot to say my code is intended mainly for machines that do not provide
> hardware float128 support. However I did compare with the glibc
> expf128 on (ppc64le GNU/Linux) and below are the
> results. You can reproduce them with the code from [1]. We see that
> my implementation is about 27% faster, but slightly less accurate
> (999585 instead of 999999 correct rounding over 1000000). One caveat
> though: I did not find how to efficiently set the inexact flag, thus
> it is not set in my code.

There is no expectation that most libm functions (other than those such as 
fma and sqrt that are fully defined by the corresponding IEEE operations) 
set inexact correctly.  (It is necessary to set other exceptions 
correctly, and the glibc testsuite verifies that; for expf128, that's 
invalid (for signaling NaNs), overflow and underflow.)

Joseph S. Myers

More information about the Libc-alpha mailing list