aboutsummaryrefslogtreecommitdiff
path: root/pl/math/test/runulp.sh
diff options
context:
space:
mode:
authorJoe Ramsay <Joe.Ramsay@arm.com>2022-10-19 14:51:12 +0100
committerJoe Ramsay <joe.ramsay@arm.com>2022-10-19 14:51:12 +0100
commit23f1039a7a4d43c0b45991374e99f1cf757fc1fe (patch)
tree5fd90ff177cee9a98b9a8f8d35e31ace58466356 /pl/math/test/runulp.sh
parent222183caf938d3b9626623b0a4949dc77abd5599 (diff)
downloadarm-optimized-routines-23f1039a7a4d43c0b45991374e99f1cf757fc1fe.tar.gz
pl/math: Fix subnormal handling in atan2
Previously subnormals were handled specially when determining from the exponent whether to shortcut calculating x^8. This was not the correct approach - to compare with the threshold in such a way that matches the reference they should be treated the name as normal exponents. Larger errors than previously thought were found in the subnormal region - a new test has been added in runulp and the threshold has been updated.
Diffstat (limited to 'pl/math/test/runulp.sh')
-rwxr-xr-xpl/math/test/runulp.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/pl/math/test/runulp.sh b/pl/math/test/runulp.sh
index 2a79a27..059be60 100755
--- a/pl/math/test/runulp.sh
+++ b/pl/math/test/runulp.sh
@@ -74,12 +74,13 @@ t erfcf 0x1p-26 0x1p5 40000
t erfcf -0x1p-26 -0x1p3 40000
t erfcf 0 inf 40000
-L=1.5
-t atan2 -10.0 10.0 50000
-t atan2 -1.0 1.0 40000
-t atan2 0.0 1.0 40000
-t atan2 1.0 100.0 40000
-t atan2 1e6 1e32 40000
+L=1.74
+t atan2 -10.0 10.0 50000
+t atan2 -1.0 1.0 40000
+t atan2 0.0 1.0 40000
+t atan2 1.0 100.0 40000
+t atan2 1e6 1e32 40000
+t atan2 0x1p-1022 0x1p-1000 x 0 0x1p-1022 40000
# Regression-test for correct NaN handling
check atan2 0x1.7887a0a717aefp+1017 0x1.7887a0a717aefp+1017 x -nan -nan
check atan2 nan nan x -nan -nan