From 57c26e8cb23de471123872931dc5bb6277acd498 Mon Sep 17 00:00:00 2001 From: Joe Ramsay Date: Thu, 24 Nov 2022 11:34:39 +0000 Subject: pl/math: Update ULP threshold for vector atans New max observed for both Neon and SVE. --- pl/math/sv_atan_2u5.c | 6 +++--- pl/math/test/runulp.sh | 4 ++-- pl/math/v_atan_2u5.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pl/math/sv_atan_2u5.c b/pl/math/sv_atan_2u5.c index e0b621f..49c5e82 100644 --- a/pl/math/sv_atan_2u5.c +++ b/pl/math/sv_atan_2u5.c @@ -17,9 +17,9 @@ /* Fast implementation of SVE atan. Based on atan(x) ~ shift + z + z^3 * P(z^2) with reduction to [0,1] using z=1/x and shift = pi/2. Largest errors are close to 1. The maximum observed - error is 2.22 ulps: - __sv_atan(0x1.0005fd947bf57p+0) got 0x1.9225b2c6cd6cdp-1 - want 0x1.9225b2c6cd6cfp-1. */ + error is 2.27 ulps: + __sv_atan(0x1.0005af27c23e9p+0) got 0x1.9225645bdd7c1p-1 + want 0x1.9225645bdd7c3p-1. */ sv_f64_t __sv_atan_x (sv_f64_t x, const svbool_t pg) { diff --git a/pl/math/test/runulp.sh b/pl/math/test/runulp.sh index 6410dd9..dd38e37 100755 --- a/pl/math/test/runulp.sh +++ b/pl/math/test/runulp.sh @@ -600,7 +600,7 @@ L_erf=1.26 L_erff=0.76 # TODO tighten this once __v_atan2 is fixed L_atan2=2.9 -L_atan=1.73 +L_atan=1.78 L_atan2f=2.46 L_atanf=2.5 L_log1pf=1.53 @@ -623,7 +623,7 @@ L_sve_cos=1.61 L_sve_sinf=1.40 L_sve_sin=2.03 L_sve_atanf=2.9 -L_sve_atan=1.73 +L_sve_atan=1.78 L_sve_atan2f=2.45 L_sve_atan2=1.73 L_sve_log10=1.97 diff --git a/pl/math/v_atan_2u5.c b/pl/math/v_atan_2u5.c index a0223ed..05c77c0 100644 --- a/pl/math/v_atan_2u5.c +++ b/pl/math/v_atan_2u5.c @@ -15,9 +15,9 @@ /* Fast implementation of vector atan. Based on atan(x) ~ shift + z + z^3 * P(z^2) with reduction to [0,1] using - z=1/x and shift = pi/2. Maximum observed error is 2.22 ulps: - __v_atan(0x1.0005fd947bf57p+0) got 0x1.9225b2c6cd6cdp-1 - want 0x1.9225b2c6cd6cfp-1. */ + z=1/x and shift = pi/2. Maximum observed error is 2.27 ulps: + __v_atan(0x1.0005af27c23e9p+0) got 0x1.9225645bdd7c1p-1 + want 0x1.9225645bdd7c3p-1. */ VPCS_ATTR v_f64_t V_NAME (atan) (v_f64_t x) { -- cgit v1.2.3