[PATCH] Improves __ieee754_exp() performance by greater than 5x on sparc/x86.
Patrick McGehearty
patrick.mcgehearty@oracle.com
Sat Oct 21 05:23:00 GMT 2017
On 10/19/2017 5:48 PM, Joseph Myers wrote:
> On Thu, 19 Oct 2017, Patrick McGehearty wrote:
>
>
>>> Guaranteeing "inexact" is not part of the goals for most libm functions,
>>> so I expect you can remove that term.
>> The "inexact" test was required to pass the (make check) math lib tests.
> You'll need to explain more. For functions which are not fully defined by
> a binding to IEEE operations, both spurious and missing "inexact" should
> be allowed by the testsuite.
>
When the following lines are commented out:
    double force_underflow = tiny * tiny;
    math_force_eval (force_underflow);
The following failures appear (plus repeated for other rounding modes)
Failure: exp (-0x2.c4edp+12): Exception "Underflow" not set
Failure: exp (-0x2.c5b2319c4843ap+12): Exception "Underflow" not set
Failure: exp (-0x2.c5b2319c4843cp+12): Exception "Underflow" not set
Failure: exp (-0x2.c5b234p+12): Exception "Underflow" not set
Failure: exp (-0x2.c5b23p+12): Exception "Underflow" not set
Failure: exp (-0x2.c5bd48bdc7c0cp+12): Exception "Underflow" not set
Failure: exp (-0x2.c5bd48bdc7c0ep+12): Exception "Underflow" not set
Failure: exp (-0x2.c5bd48p+12): Exception "Underflow" not set
Failure: exp (-0x2.c5bd4cp+12): Exception "Underflow" not set
Failure: exp (-0x2.ebe224p+8): Exception "Underflow" not set
Failure: exp (-0x2.ebe227861639p+8): Exception "Underflow" not set
Failure: exp (-0x2.ebe228p+8): Exception "Underflow" not set
Failure: exp (-0x4.d2p+8): Exception "Underflow" not set
Failure: exp (-0xf.ffffffffffff8p+1020): Exception "Underflow" not set
Failure: exp (-0xf.fffffp+124): Exception "Underflow" not set
The same pair of instructions are used in the old e_exp.c
to set the underflow exception, which means the new code
will match the behavior of the old code for underflows.
- patrick
More information about the Libc-alpha
mailing list