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: Fix Bessel function spurious overflows for ldbl-128 /ldbl-128ibm (bug 15285)


From: "Joseph S. Myers" <joseph@codesourcery.com>
Date: Sun, 17 Mar 2013 20:49:28 +0000

> Where the Bessel function implementations improve the accuracy of
> their calculations by using cos of twice the input, this requires a
> cut-off to avoid internal overflow when twice the input would
> overflow.  Bug 15285 is the absence of that cut-off in the ldbl-128 /
> ldbl-128ibm implementation.  This patch adds the missing cut-off
> checks and adds testcases that confirm such large inputs are handled
> OK for double and IBM long double.
> 
> Tested x86_64, x86 and powerpc64.

Here is the necessary sparc ULPs update, thanks for fixing this:

diff --git a/sysdeps/sparc/fpu/libm-test-ulps b/sysdeps/sparc/fpu/libm-test-ulps
index bacac6e..98917b1 100644
--- a/sysdeps/sparc/fpu/libm-test-ulps
+++ b/sysdeps/sparc/fpu/libm-test-ulps
@@ -2637,6 +2637,9 @@ float: 2
 ifloat: 2
 ildouble: 1
 ldouble: 1
+Test "j0 (0x1p1023) == -1.5665258060609012834424478437196679802783e-155":
+ildouble: 1
+ldouble: 1
 Test "j0 (0x1p16383) == 9.5859502826270374691362975419147645151233e-2467":
 ildouble: 2
 ldouble: 2
@@ -2680,9 +2683,15 @@ double: 1
 idouble: 1
 ildouble: 1
 ldouble: 1
+Test "j1 (0x1p1023) == 8.2687542933709649327986678723012001545638e-155":
+ildouble: 1
+ldouble: 1
 Test "j1 (0x1p16382) == 8.0839224448726336195866026476176740513439e-2467":
 ildouble: 1
 ldouble: 1
+Test "j1 (0x1p16383) == -3.8895531955766020648617743624167352352217e-2467":
+ildouble: 2
+ldouble: 2
 Test "j1 (1.0) == 0.440050585744933515959682203718914913":
 ildouble: 1
 ldouble: 1
@@ -3283,9 +3292,15 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
+Test "y0 (0x1p1023) == 8.2687542933709649327986678723012001545638e-155":
+ildouble: 1
+ldouble: 1
 Test "y0 (0x1p16382) == 8.0839224448726336195866026476176740513439e-2467":
 ildouble: 1
 ldouble: 1
+Test "y0 (0x1p16383) == -3.8895531955766020648617743624167352352217e-2467":
+ildouble: 2
+ldouble: 2
 Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
 double: 2
 float: 1
@@ -3330,6 +3345,9 @@ ldouble: 1
 Test "y1 (0x1p-30) == -6.8356527557643159612937462812258975438856e+08":
 ildouble: 1
 ldouble: 1
+Test "y1 (0x1p1023) == 1.5665258060609012834424478437196679802783e-155":
+ildouble: 1
+ldouble: 1
 Test "y1 (0x1p16383) == -9.5859502826270374691362975419147645151233e-2467":
 ildouble: 2
 ldouble: 2


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