[PATCH] x86-64: Optimize e_expf with FMA [BZ #21912]
Joseph Myers
joseph@codesourcery.com
Wed Aug 16 17:12:00 GMT 2017
On Wed, 16 Aug 2017, Szabolcs Nagy wrote:
> the idea is that the x86 asm has overkill
> precision (very close to 0.5 ulp error, but
> not correctly rounded), we can debate this
> later, but i think the polynomial can be
> reduced and there should not be much difference
I think that when choosing a level of accuracy for which to tune a
polynomial (when the function implementation is such that you can readily
choose the accuracy) it's reasonable to aim for a round-to-nearest result
that is the result of rounding the mathematical result up or down (which
implies the exact result when the mathematical result is exactly
representable), and a result in other modes that is either one of those
values, or the result of applying nextup or nextdown to one of them.
(This implies a round-to-nearest error of at most 1ulp in the terms in
which the libm-test infrastructure measures it, relative to a
correctly-rounded result, and an error in other rounding modes of at most
3ulp, normally at most 2ulp, in those terms.)
Correct rounding should explicitly not be a goal for libm functions not
bound to IEEE operations, and I'm doubtful of aiming for 0.501ulp errors
either.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list