xref: /freebsd/contrib/arm-optimized-routines/math/test/mathbench_funcs.h (revision 9f23cbd6cae82fd77edfad7173432fa8dccd0a95)
1 /*
2  * Function entries for mathbench.
3  *
4  * Copyright (c) 2022, Arm Limited.
5  * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
6  */
7 D (exp, -9.9, 9.9)
8 D (exp, 0.5, 1.0)
9 D (exp2, -9.9, 9.9)
10 D (log, 0.01, 11.1)
11 D (log, 0.999, 1.001)
12 D (log2, 0.01, 11.1)
13 D (log2, 0.999, 1.001)
14 {"pow", 'd', 0, 0.01, 11.1, {.d = xypow}},
15 D (xpow, 0.01, 11.1)
16 D (ypow, -9.9, 9.9)
17 D (erf, -6.0, 6.0)
18 
19 F (expf, -9.9, 9.9)
20 F (exp2f, -9.9, 9.9)
21 F (logf, 0.01, 11.1)
22 F (log2f, 0.01, 11.1)
23 {"powf", 'f', 0, 0.01, 11.1, {.f = xypowf}},
24 F (xpowf, 0.01, 11.1)
25 F (ypowf, -9.9, 9.9)
26 {"sincosf", 'f', 0, 0.1, 0.7, {.f = sincosf_wrap}},
27 {"sincosf", 'f', 0, 0.8, 3.1, {.f = sincosf_wrap}},
28 {"sincosf", 'f', 0, -3.1, 3.1, {.f = sincosf_wrap}},
29 {"sincosf", 'f', 0, 3.3, 33.3, {.f = sincosf_wrap}},
30 {"sincosf", 'f', 0, 100, 1000, {.f = sincosf_wrap}},
31 {"sincosf", 'f', 0, 1e6, 1e32, {.f = sincosf_wrap}},
32 F (sinf, 0.1, 0.7)
33 F (sinf, 0.8, 3.1)
34 F (sinf, -3.1, 3.1)
35 F (sinf, 3.3, 33.3)
36 F (sinf, 100, 1000)
37 F (sinf, 1e6, 1e32)
38 F (cosf, 0.1, 0.7)
39 F (cosf, 0.8, 3.1)
40 F (cosf, -3.1, 3.1)
41 F (cosf, 3.3, 33.3)
42 F (cosf, 100, 1000)
43 F (cosf, 1e6, 1e32)
44 F (erff, -4.0, 4.0)
45 #if WANT_VMATH
46 D (__s_sin, -3.1, 3.1)
47 D (__s_cos, -3.1, 3.1)
48 D (__s_exp, -9.9, 9.9)
49 D (__s_log, 0.01, 11.1)
50 {"__s_pow", 'd', 0, 0.01, 11.1, {.d = xy__s_pow}},
51 F (__s_expf, -9.9, 9.9)
52 F (__s_expf_1u, -9.9, 9.9)
53 F (__s_exp2f, -9.9, 9.9)
54 F (__s_exp2f_1u, -9.9, 9.9)
55 F (__s_logf, 0.01, 11.1)
56 {"__s_powf", 'f', 0, 0.01, 11.1, {.f = xy__s_powf}},
57 F (__s_sinf, -3.1, 3.1)
58 F (__s_cosf, -3.1, 3.1)
59 #if __aarch64__
60 VD (__v_sin, -3.1, 3.1)
61 VD (__v_cos, -3.1, 3.1)
62 VD (__v_exp, -9.9, 9.9)
63 VD (__v_log, 0.01, 11.1)
64 {"__v_pow", 'd', 'v', 0.01, 11.1, {.vd = xy__v_pow}},
65 VF (__v_expf, -9.9, 9.9)
66 VF (__v_expf_1u, -9.9, 9.9)
67 VF (__v_exp2f, -9.9, 9.9)
68 VF (__v_exp2f_1u, -9.9, 9.9)
69 VF (__v_logf, 0.01, 11.1)
70 {"__v_powf", 'f', 'v', 0.01, 11.1, {.vf = xy__v_powf}},
71 VF (__v_sinf, -3.1, 3.1)
72 VF (__v_cosf, -3.1, 3.1)
73 #ifdef __vpcs
74 VND (__vn_exp, -9.9, 9.9)
75 VND (_ZGVnN2v_exp, -9.9, 9.9)
76 VND (__vn_log, 0.01, 11.1)
77 VND (_ZGVnN2v_log, 0.01, 11.1)
78 {"__vn_pow", 'd', 'n', 0.01, 11.1, {.vnd = xy__vn_pow}},
79 {"_ZGVnN2vv_pow", 'd', 'n', 0.01, 11.1, {.vnd = xy_Z_pow}},
80 VND (__vn_sin, -3.1, 3.1)
81 VND (_ZGVnN2v_sin, -3.1, 3.1)
82 VND (__vn_cos, -3.1, 3.1)
83 VND (_ZGVnN2v_cos, -3.1, 3.1)
84 VNF (__vn_expf, -9.9, 9.9)
85 VNF (_ZGVnN4v_expf, -9.9, 9.9)
86 VNF (__vn_expf_1u, -9.9, 9.9)
87 VNF (__vn_exp2f, -9.9, 9.9)
88 VNF (_ZGVnN4v_exp2f, -9.9, 9.9)
89 VNF (__vn_exp2f_1u, -9.9, 9.9)
90 VNF (__vn_logf, 0.01, 11.1)
91 VNF (_ZGVnN4v_logf, 0.01, 11.1)
92 {"__vn_powf", 'f', 'n', 0.01, 11.1, {.vnf = xy__vn_powf}},
93 {"_ZGVnN4vv_powf", 'f', 'n', 0.01, 11.1, {.vnf = xy_Z_powf}},
94 VNF (__vn_sinf, -3.1, 3.1)
95 VNF (_ZGVnN4v_sinf, -3.1, 3.1)
96 VNF (__vn_cosf, -3.1, 3.1)
97 VNF (_ZGVnN4v_cosf, -3.1, 3.1)
98 #endif
99 #endif
100 #endif
101