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.
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: "patrick dot mcgehearty at oracle dot com" <patrick dot mcgehearty at oracle dot com>
- Cc: nd <nd at arm dot com>, Joseph Myers <joseph at codesourcery dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Fri, 20 Oct 2017 13:38:16 +0000
- Subject: Re: [PATCH] Improves __ieee754_exp() performance by greater than 5x on sparc/x86.
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Patrick wrote:
+ fe_val = __fegetround();
> Failing to use __fegetround(),__fesetround() causes over 40 math test
> accuracy failures for other rounding modes in exp, cexp, cpow, cosh,
> ccos, ccosh, csin, and csinh. If the glibc/Linux community were to
> declare that the only rounding mode that was fully supported was
> FE_TONEAREST, we could simplify/speed up a lot of code. :-)
"Failure" is too unspecific. What is the difference in ULP? If it is from
say 2 to 20 then yes that's an issue. If it is from 2 to 3 in a non-nearest
rounding mode then that's perfectly acceptable.
Anyway, never use __fegetround/__fesetround. Use get_rounding_mode
which is inlined on all targets and libc_fesetround which is inlined on most
targets.
Wilco