aboutsummaryrefslogtreecommitdiff
path: root/math/test/testcases
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/testcases
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/testcases')
-rw-r--r--math/test/testcases/directed/erf.tst17
1 files changed, 17 insertions, 0 deletions
diff --git a/math/test/testcases/directed/erf.tst b/math/test/testcases/directed/erf.tst
new file mode 100644
index 0000000..7fa4d18
--- /dev/null
+++ b/math/test/testcases/directed/erf.tst
@@ -0,0 +1,17 @@
+; erf.tst - Directed test cases for erf
+;
+; Copyright (c) 2007-2020, Arm Limited.
+; SPDX-License-Identifier: MIT
+
+func=erf op1=7ff80000.00000001 result=7ff80000.00000001 errno=0
+func=erf op1=fff80000.00000001 result=7ff80000.00000001 errno=0
+func=erf op1=7ff00000.00000001 result=7ff80000.00000001 errno=0 status=i
+func=erf op1=fff00000.00000001 result=7ff80000.00000001 errno=0 status=i
+func=erf op1=7ff00000.00000000 result=3ff00000.00000000 errno=0
+func=erf op1=fff00000.00000000 result=bff00000.00000000 errno=0
+func=erf op1=00000000.00000000 result=00000000.00000000 errno=ERANGE
+func=erf op1=80000000.00000000 result=80000000.00000000 errno=ERANGE
+func=erf op1=00000000.00000001 result=00000000.00000001 errno=0 status=ux
+func=erf op1=80000000.00000001 result=80000000.00000001 errno=0 status=ux
+func=erf op1=3ff00000.00000000 result=3feaf767.a741088a.c6d errno=0
+func=erf op1=bff00000.00000000 result=bfeaf767.a741088a.c6d errno=0