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.


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



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