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


Thanks for all of your feedback Joseph, I think I have everything
taken care of now.

If you're OK with this change I'll put together the ChangeLog as well
as the ULP updates for i386, x86-64, and sparc.

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 225a5e1..801a6f8 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -10198,6 +10198,18 @@ y0_test (void)
   TEST_f_f (y0, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L, UNDERFLOW_EXCEPTION_OK);
 #endif
 
+  TEST_f_f (y0, 0x1p-10L, -4.4865150767109739412411806297168793661098L);
+  TEST_f_f (y0, 0x1p-20L, -8.8992283012125827603076426611387876938160L);
+  TEST_f_f (y0, 0x1p-30L, -1.3311940304267782826037118027401817264906e+1L);
+  TEST_f_f (y0, 0x1p-40L, -1.7724652307320814696990854700366226762563e+1L);
+  TEST_f_f (y0, 0x1p-50L, -2.2137364310373846564919987139743760738155e+1L);
+  TEST_f_f (y0, 0x1p-60L, -2.6550076313426878432849115782108205929120e+1L);
+  TEST_f_f (y0, 0x1p-70L, -3.0962788316479910300778244424468159753887e+1L);
+  TEST_f_f (y0, 0x1p-80L, -3.5375500319532942168707373066828113573541e+1L);
+  TEST_f_f (y0, 0x1p-90L, -3.9788212322585974036636501709188067393195e+1L);
+  TEST_f_f (y0, 0x1p-100L, -4.420092432563900590456563035154802121284e+1L);
+  TEST_f_f (y0, 0x1p-110L, -4.861363632869203777249475899390797503250e+1L);
+
   END (y0);
 }
 
diff --git a/sysdeps/ieee754/flt-32/e_j0f.c b/sysdeps/ieee754/flt-32/e_j0f.c
index 0729cd0..c4cabd5 100644
--- a/sysdeps/ieee754/flt-32/e_j0f.c
+++ b/sysdeps/ieee754/flt-32/e_j0f.c
@@ -138,7 +138,7 @@ __ieee754_y0f(float x)
 		}
 		return z;
 	}
-	if(ix<=0x32000000) {	/* x < 2**-27 */
+	if(ix<=0x39800000) {	/* x < 2**-13 */
 	    return(u00 + tpi*__ieee754_logf(x));
 	}
 	z = x*x;
diff --git a/sysdeps/ieee754/flt-32/e_j1f.c b/sysdeps/ieee754/flt-32/e_j1f.c
index 30b7d8e..cb9f97f 100644
--- a/sysdeps/ieee754/flt-32/e_j1f.c
+++ b/sysdeps/ieee754/flt-32/e_j1f.c
@@ -133,7 +133,7 @@ __ieee754_y1f(float x)
 		}
 		return z;
 	}
-	if(__builtin_expect(ix<=0x24800000, 0)) {    /* x < 2**-54 */
+	if(__builtin_expect(ix<=0x33000000, 0)) {    /* x < 2**-25 */
 	    return(-tpi/x);
 	}
 	z = x*x;
diff --git a/sysdeps/ieee754/ldbl-128/e_j0l.c b/sysdeps/ieee754/ldbl-128/e_j0l.c
index 112a8f3..6f07a5c 100644
--- a/sysdeps/ieee754/ldbl-128/e_j0l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j0l.c
@@ -809,6 +809,7 @@ static long double Y0_2D[NY0_2D + 1] = {
  /* 1.000000000000000000000000000000000000000E0 */
 };
 
+static const long double U0 = -7.3804295108687225274343927948483016310862e-02;
 
 /* Bessel function of the second kind, order zero.  */
 
@@ -831,6 +832,8 @@ long double
       return -HUGE_VALL + x;
     }
   xx = fabsl (x);
+  if (xx <= 0x1p-57)
+    return U0 + TWOOPI * __ieee754_logl (x);
   if (xx <= 2.0L)
     {
       /* 0 <= x <= 2 */
diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c
index 1f62bd0..f16343b 100644
--- a/sysdeps/ieee754/ldbl-128/e_j1l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j1l.c
@@ -838,6 +838,8 @@ __ieee754_y1l (long double x)
       return -HUGE_VALL + x;
     }
   xx = fabsl (x);
+  if (xx <= 0x1p-114)
+    return -TWOOPI / x;
   if (xx <= 2.0L)
     {
       /* 0 <= x <= 2 */


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