This is the mail archive of the 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] New numbers in the benchtests.

On Wed, 20 Dec 2017, Patrick McGehearty wrote:

> I did note in the comments (fairly far down) to the patch that
> "For x86, tgamma showed a few values where the ulp increased to
> 6 (max ulp for tgamma is 5). Sparc tgamma did not show these failures."

The problem isn't ulps changes, the problem is that there were test 
failures (missing errno setting in this case) *other than* ones for which 
a libm-test-ulps regeneration sufficed, and such failures always need more 

> If the hypothesis is correct, I find it odd for get_rounding_mode
> to not have matching behavior with libc_fesetround for x86.

Well, get_rounding_mode has previously only been used (on x86_64 / x86) in 
interfaces such as strtod / printf (for which it was originally added), 
for which results when the SSE and x87 rounding modes are different don't 
matter.  Whereas libm functions can be called internally when those modes 
are different, as part of optimizations that rely on knowing which 
rounding mode is relevant for computations in a particular type and 
avoiding changing the other part of the floating-point state.  Thus, you 
need type-specific interfaces in libm (libc_fegetround{,f,l}) whereas you 
don't in strtod / printf.  (Of course this doesn't make any difference for 
architectures other than x86_64 / x86, because that's the only case where 
you have two different sets of floating-point state at all.)

Joseph S. Myers

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