about summary refs log tree commit diff
path: root/sysdeps/sparc/fpu
diff options
context:
space:
mode:
authorPaul Zimmermann <Paul.Zimmermann@inria.fr>2021-04-01 08:14:10 +0200
committerPaul Zimmermann <Paul.Zimmermann@inria.fr>2021-04-02 06:15:48 +0200
commit9acda61d94acc5348c2330f2519a14d1a4a37e73 (patch)
treedcad90e95870279c37b5be7c646b3a3f6edc15cb /sysdeps/sparc/fpu
parent595c22ecd8e87a27fd19270ed30fdbae9ad25426 (diff)
downloadglibc-9acda61d94acc5348c2330f2519a14d1a4a37e73.tar.gz
glibc-9acda61d94acc5348c2330f2519a14d1a4a37e73.tar.xz
glibc-9acda61d94acc5348c2330f2519a14d1a4a37e73.zip
Fix the inaccuracy of j0f/j1f/y0f/y1f [BZ #14469, #14470, #14471, #14472]
For j0f/j1f/y0f/y1f, the largest error for all binary32
inputs is reduced to at most 9 ulps for all rounding modes.

The new code is enabled only when there is a cancellation at the very end of
the j0f/j1f/y0f/y1f computation, or for very large inputs, thus should not
give any visible slowdown on average.  Two different algorithms are used:

* around the first 64 zeros of j0/j1/y0/y1, approximation polynomials of
  degree 3 are used, computed using the Sollya tool (https://www.sollya.org/)

* for large inputs, an asymptotic formula from [1] is used

[1] Fast and Accurate Bessel Function Computation,
    John Harrison, Proceedings of Arith 19, 2009.

Inputs yielding the new largest errors are added to auto-libm-test-in,
and ulps are regenerated for various targets (thanks Adhemerval Zanella).

Tested on x86_64 with --disable-multi-arch and on powerpc64le-linux-gnu.
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/sparc/fpu')
-rw-r--r--sysdeps/sparc/fpu/libm-test-ulps68
1 files changed, 34 insertions, 34 deletions
diff --git a/sysdeps/sparc/fpu/libm-test-ulps b/sysdeps/sparc/fpu/libm-test-ulps
index 74a5490ba7..c2e4649524 100644
--- a/sysdeps/sparc/fpu/libm-test-ulps
+++ b/sysdeps/sparc/fpu/libm-test-ulps
@@ -1066,43 +1066,43 @@ ldouble: 1
 
 Function: "j0":
 double: 2
-float: 8
+float: 9
 ldouble: 2
 
 Function: "j0_downward":
-double: 2
-float: 4
-ldouble: 4
+double: 5
+float: 9
+ldouble: 9
 
 Function: "j0_towardzero":
-double: 4
-float: 5
-ldouble: 4
+double: 6
+float: 9
+ldouble: 9
 
 Function: "j0_upward":
-double: 4
-float: 5
-ldouble: 5
+double: 9
+float: 9
+ldouble: 7
 
 Function: "j1":
-double: 2
+double: 4
 float: 9
 ldouble: 4
 
 Function: "j1_downward":
-double: 3
-float: 5
-ldouble: 4
+double: 5
+float: 8
+ldouble: 6
 
 Function: "j1_towardzero":
-double: 3
-float: 2
-ldouble: 4
+double: 4
+float: 8
+ldouble: 9
 
 Function: "j1_upward":
-double: 3
-float: 5
-ldouble: 3
+double: 9
+float: 9
+ldouble: 9
 
 Function: "jn":
 double: 4
@@ -1362,42 +1362,42 @@ ldouble: 4
 
 Function: "y0":
 double: 3
-float: 8
+float: 9
 ldouble: 3
 
 Function: "y0_downward":
 double: 3
-float: 6
-ldouble: 4
+float: 9
+ldouble: 7
 
 Function: "y0_towardzero":
-double: 3
-float: 3
+double: 4
+float: 9
 ldouble: 3
 
 Function: "y0_upward":
 double: 3
-float: 6
-ldouble: 3
+float: 9
+ldouble: 4
 
 Function: "y1":
 double: 3
-float: 2
-ldouble: 2
+float: 9
+ldouble: 5
 
 Function: "y1_downward":
-double: 3
-float: 2
-ldouble: 4
+double: 6
+float: 9
+ldouble: 5
 
 Function: "y1_towardzero":
 double: 3
-float: 2
+float: 9
 ldouble: 2
 
 Function: "y1_upward":
 double: 7
-float: 2
+float: 9
 ldouble: 5
 
 Function: "yn":