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 COMMITTED] Regenerate sparc ULPs.

From: "Joseph S. Myers" <>
Date: Wed, 23 Apr 2014 15:07:11 +0000

> On Mon, 14 Apr 2014, David Miller wrote:
>> From: Stefan Liebler <>
>> Date: Mon, 14 Apr 2014 10:56:24 +0200
>> > on s390 test-ldouble / test-ildoubl shows the same ULP for y1(0x2p+0)
>> > (see
>> > 
>> > Please test the posted patch.
>> Yep, it clears the long-double cases for me.
>> I still have a large ULP of 10 for test-float's y1_upward().
> I'm going to guess that this doesn't appear on x86_64 because of the 
> x86_64 implementation of trig functions using double precision internally 
> so having smaller error accumulation than the generic flt-32 versions.  
> Saving / restoring the rounding mode in y1f would seem a reasonable 
> solution.

The following does the trick for me, any objections?

It would also be great if Stefan Liebler's bug fix at:

got approved as well as that fixes the only other major math test
failure I was seeing on sparc.


2014-04-28  David S. Miller  <>

	* sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_y1f): Set
	round-to-nearest internally in the "|x| >= 2.0" code paths to
	reduce error accumulation.

diff --git a/sysdeps/ieee754/flt-32/e_j1f.c b/sysdeps/ieee754/flt-32/e_j1f.c
index cb9f97f..a180968 100644
--- a/sysdeps/ieee754/flt-32/e_j1f.c
+++ b/sysdeps/ieee754/flt-32/e_j1f.c
@@ -107,6 +107,7 @@ __ieee754_y1f(float x)
 		return -HUGE_VALF+x;  /* -inf and overflow exception.  */
 	if(__builtin_expect(hx<0, 0)) return zero/(zero*x);
 	if(ix >= 0x40000000) {  /* |x| >= 2.0 */
 		__sincosf (x, &s, &c);
 		ss = -s-c;
 		cc = s-c;

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