aboutsummaryrefslogtreecommitdiff
path: root/math/test/runulp.sh
diff options
context:
space:
mode:
authorPierre Blanchard <pierre.blanchard@arm.com>2020-11-05 16:26:36 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2020-11-13 14:43:49 +0000
commit00e5afdbaf600cb8d56072685e987800d8678248 (patch)
tree312326613eb7e581fdf0e17766d48cf01d40da65 /math/test/runulp.sh
parentfc3fcc91ba7d79b30876d8e7ee68b8442a50da5c (diff)
downloadarm-optimized-routines-00e5afdbaf600cb8d56072685e987800d8678248.tar.gz
math: add scalar erf
Only tested in round-to-nearest mode. The expected worst case error is 1.01 ULP near x=1.25. Benchmarked over random x in [-6,6] and can increase performance by > 2x (> 3.5x for throughput) on big ooo cores compared to the implementation in glibc 2.28. Includes data for erfc too, but this patch only adds erf.
Diffstat (limited to 'math/test/runulp.sh')
-rwxr-xr-xmath/test/runulp.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/math/test/runulp.sh b/math/test/runulp.sh
index 283145e..492a6f2 100755
--- a/math/test/runulp.sh
+++ b/math/test/runulp.sh
@@ -72,6 +72,14 @@ t pow 0x1.ffffffffffff0p-1 0x1.0000000000008p0 x 0x1p60 0x1p68 50000
t pow 0x1.ffffffffff000p-1 0x1p0 x 0x1p50 0x1p52 50000
t pow -0x1.ffffffffff000p-1 -0x1p0 x 0x1p50 0x1p52 50000
+L=1.0
+t erf 0 0xffff000000000000 10000
+t erf 0x1p-1022 0x1p-26 40000
+t erf -0x1p-1022 -0x1p-26 40000
+t erf 0x1p-26 0x1p3 40000
+t erf -0x1p-26 -0x1p3 40000
+t erf 0 inf 40000
+
L=0.01
t expf 0 0xffff0000 10000
t expf 0x1p-14 0x1p8 50000