aboutsummaryrefslogtreecommitdiff
path: root/math/test/mathbench.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2019-08-09 15:39:09 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2019-10-14 11:58:53 +0100
commitc5cba8528da13fe0d647dbd0f80d0cf21434b224 (patch)
treefe2dfbc6732ee358a011073e39adf4d36c71a86a /math/test/mathbench.c
parentc280e49d7b1d1987e75de0e0e57a63ee7167ad5f (diff)
downloadarm-optimized-routines-c5cba8528da13fe0d647dbd0f80d0cf21434b224.tar.gz
Add vector sinf and cosf
The polynomials were produced by searching the coefficient space using heuristics and ideas from https://arxiv.org/abs/1508.03211 The worst-case error is 1.886 ulp, large inputs (> 2^20) and other special cases use scalar sinf and cosf.
Diffstat (limited to 'math/test/mathbench.c')
-rw-r--r--math/test/mathbench.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/math/test/mathbench.c b/math/test/mathbench.c
index e4d4a8b..7544a7e 100644
--- a/math/test/mathbench.c
+++ b/math/test/mathbench.c
@@ -216,12 +216,14 @@ F (sinf, -3.1, 3.1)
F (sinf, 3.3, 33.3)
F (sinf, 100, 1000)
F (sinf, 1e6, 1e32)
+F (__s_sinf, -3.1, 3.1)
F (cosf, 0.1, 0.7)
F (cosf, 0.8, 3.1)
F (cosf, -3.1, 3.1)
F (cosf, 3.3, 33.3)
F (cosf, 100, 1000)
F (cosf, 1e6, 1e32)
+F (__s_cosf, -3.1, 3.1)
#if __aarch64__
VD (__v_dummy, 1.0, 2.0)
VD (__v_exp, -9.9, 9.9)
@@ -229,6 +231,8 @@ VF (__v_dummyf, 1.0, 2.0)
VF (__v_expf, -9.9, 9.9)
VF (__v_expf_1u, -9.9, 9.9)
VF (__v_logf, 0.01, 11.1)
+VF (__v_sinf, -3.1, 3.1)
+VF (__v_cosf, -3.1, 3.1)
#ifdef __vpcs
VND (__vn_dummy, 1.0, 2.0)
VND (__vn_exp, -9.9, 9.9)
@@ -239,6 +243,10 @@ VNF (_ZGVnN4v_expf, -9.9, 9.9)
VNF (__vn_expf_1u, -9.9, 9.9)
VNF (__vn_logf, 0.01, 11.1)
VNF (_ZGVnN4v_logf, 0.01, 11.1)
+VNF (__vn_sinf, -3.1, 3.1)
+VNF (_ZGVnN4v_sinf, -3.1, 3.1)
+VNF (__vn_cosf, -3.1, 3.1)
+VNF (_ZGVnN4v_cosf, -3.1, 3.1)
#endif
#endif
{0},