1 // Copyright Naoki Shibata and contributors 2010 - 2020.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <stdint.h>
9 #include <string.h>
10 #include <time.h>
11 #include <inttypes.h>
12 #include <assert.h>
13
14 #include <math.h>
15
16 #if defined(_MSC_VER)
17 #define STDIN_FILENO 0
18 #else
19 #include <unistd.h>
20 #include <sys/types.h>
21 #include <signal.h>
22 #endif
23
24 #include "misc.h"
25
26 #if !defined(USE_INLINE_HEADER)
27 #include "sleef.h"
28 #else // #if !defined(USE_INLINE_HEADER)
29 #include <stddef.h>
30 #include <stdint.h>
31 #include <float.h>
32 #include <limits.h>
33
34 #if defined(__AVX2__) || defined(__aarch64__) || defined(__arm__) || defined(__powerpc64__)
35 #ifndef FP_FAST_FMA
36 #define FP_FAST_FMA
37 #endif
38 #endif
39
40 #if defined(_MSC_VER) && !defined(__STDC__)
41 #define __STDC__ 1
42 #endif
43
44 #if (defined(__GNUC__) || defined(__CLANG__)) && (defined(__i386__) || defined(__x86_64__))
45 #include <x86intrin.h>
46 #endif
47
48 #if (defined(_MSC_VER))
49 #include <intrin.h>
50 #endif
51
52 #if defined(__ARM_NEON__) || defined(__ARM_NEON)
53 #include <arm_neon.h>
54 #endif
55
56 #if defined(__ARM_FEATURE_SVE)
57 #include <arm_sve.h>
58 #endif
59
60 #if defined(__VSX__)
61 #include <altivec.h>
62 #endif
63
64 #if defined(__VX__)
65 #include <vecintrin.h>
66 #endif
67
68 #define SLEEF_ALWAYS_INLINE inline
69 #define SLEEF_INLINE
70 #define SLEEF_CONST
71 #include USE_INLINE_HEADER
72 #include MACRO_ONLY_HEADER
73
74 #endif // #if !defined(USE_INLINE_HEADER)
75
76 #include "testerutil.h"
77
78 #define DORENAME
79
80 #ifdef ENABLE_SSE2
81 #include "renamesse2.h"
82 #if !defined(USE_INLINE_HEADER)
83 #define CONFIG 2
84 #include "helpersse2.h"
85 typedef Sleef___m128d_2 vdouble2;
86 typedef Sleef___m128_2 vfloat2;
87 #endif
88 #endif
89
90 #ifdef ENABLE_SSE4
91 #include "renamesse4.h"
92 #if !defined(USE_INLINE_HEADER)
93 #define CONFIG 4
94 #include "helpersse2.h"
95 typedef Sleef___m128d_2 vdouble2;
96 typedef Sleef___m128_2 vfloat2;
97 #endif
98 #endif
99
100 #ifdef ENABLE_AVX
101 #include "renameavx.h"
102 #if !defined(USE_INLINE_HEADER)
103 #define CONFIG 1
104 #include "helperavx.h"
105 typedef Sleef___m256d_2 vdouble2;
106 typedef Sleef___m256_2 vfloat2;
107 #endif
108 #endif
109
110 #ifdef ENABLE_FMA4
111 #include "renamefma4.h"
112 #if !defined(USE_INLINE_HEADER)
113 #define CONFIG 4
114 #include "helperavx.h"
115 typedef Sleef___m256d_2 vdouble2;
116 typedef Sleef___m256_2 vfloat2;
117 #endif
118 #endif
119
120 #ifdef ENABLE_AVX2
121 #include "renameavx2.h"
122 #if !defined(USE_INLINE_HEADER)
123 #define CONFIG 1
124 #include "helperavx2.h"
125 typedef Sleef___m256d_2 vdouble2;
126 typedef Sleef___m256_2 vfloat2;
127 #endif
128 #endif
129
130 #ifdef ENABLE_AVX2128
131 #include "renameavx2128.h"
132 #if !defined(USE_INLINE_HEADER)
133 #define CONFIG 1
134 #include "helperavx2_128.h"
135 typedef Sleef___m128d_2 vdouble2;
136 typedef Sleef___m128_2 vfloat2;
137 #endif
138 #endif
139
140 #ifdef ENABLE_AVX512F
141 #include "renameavx512f.h"
142 #if !defined(USE_INLINE_HEADER)
143 #define CONFIG 1
144 #include "helperavx512f.h"
145 typedef Sleef___m512d_2 vdouble2;
146 typedef Sleef___m512_2 vfloat2;
147 #endif
148 #endif
149
150 #ifdef ENABLE_AVX512FNOFMA
151 #include "renameavx512fnofma.h"
152 #if !defined(USE_INLINE_HEADER)
153 #define CONFIG 2
154 #include "helperavx512f.h"
155 typedef Sleef___m512d_2 vdouble2;
156 typedef Sleef___m512_2 vfloat2;
157 #endif
158 #endif
159
160 #ifdef ENABLE_VECEXT
161 #define CONFIG 1
162 #include "helpervecext.h"
163 #include "norename.h"
164 #endif
165
166 #ifdef ENABLE_PUREC
167 #define CONFIG 1
168 #include "helperpurec.h"
169 #include "norename.h"
170 #endif
171
172 #ifdef ENABLE_NEON32
173 #include "renameneon32.h"
174 #if !defined(USE_INLINE_HEADER)
175 #define CONFIG 1
176 #include "helperneon32.h"
177 typedef Sleef_float32x4_t_2 vfloat2;
178 #endif
179 #endif
180
181 #ifdef ENABLE_NEON32VFPV4
182 #include "renameneon32vfpv4.h"
183 #if !defined(USE_INLINE_HEADER)
184 #define CONFIG 4
185 #include "helperneon32.h"
186 typedef Sleef_float32x4_t_2 vfloat2;
187 #endif
188 #endif
189
190 #ifdef ENABLE_ADVSIMD
191 #include "renameadvsimd.h"
192 #if !defined(USE_INLINE_HEADER)
193 #define CONFIG 1
194 #include "helperadvsimd.h"
195 typedef Sleef_float64x2_t_2 vdouble2;
196 typedef Sleef_float32x4_t_2 vfloat2;
197 #endif
198 #endif
199
200 #ifdef ENABLE_ADVSIMDNOFMA
201 #include "renameadvsimdnofma.h"
202 #if !defined(USE_INLINE_HEADER)
203 #define CONFIG 2
204 #include "helperadvsimd.h"
205 typedef Sleef_float64x2_t_2 vdouble2;
206 typedef Sleef_float32x4_t_2 vfloat2;
207 #endif
208 #endif
209
210 #ifdef ENABLE_DSP128
211 #define CONFIG 2
212 #include "helpersse2.h"
213 #include "renamedsp128.h"
214 typedef Sleef___m128d_2 vdouble2;
215 typedef Sleef___m128_2 vfloat2;
216 #endif
217
218 #ifdef ENABLE_SVE
219 #include "renamesve.h"
220 #if !defined(USE_INLINE_HEADER)
221 #define CONFIG 1
222 #include "helpersve.h"
223 typedef Sleef_svfloat64_t_2 vdouble2;
224 typedef Sleef_svfloat32_t_2 vfloat2;
225 #endif
226 #endif
227
228 #ifdef ENABLE_SVENOFMA
229 #include "renamesvenofma.h"
230 #if !defined(USE_INLINE_HEADER)
231 #define CONFIG 2
232 #include "helpersve.h"
233 typedef Sleef_svfloat64_t_2 vdouble2;
234 typedef Sleef_svfloat32_t_2 vfloat2;
235 #endif
236 #endif
237
238 #ifdef ENABLE_DSP256
239 #define CONFIG 1
240 #include "helperavx.h"
241 #include "renamedsp256.h"
242 typedef Sleef___m256d_2 vdouble2;
243 typedef Sleef___m256_2 vfloat2;
244 #endif
245
246 #ifdef ENABLE_VSX
247 #include "renamevsx.h"
248 #if !defined(USE_INLINE_HEADER)
249 #define CONFIG 1
250 #include "helperpower_128.h"
251 #include "renamevsx.h"
252 typedef Sleef___vector_double_2 vdouble2;
253 typedef Sleef___vector_float_2 vfloat2;
254 #endif
255 #endif
256
257 #ifdef ENABLE_VSXNOFMA
258 #include "renamevsxnofma.h"
259 #if !defined(USE_INLINE_HEADER)
260 #define CONFIG 2
261 #include "helperpower_128.h"
262 #include "renamevsxnofma.h"
263 typedef Sleef___vector_double_2 vdouble2;
264 typedef Sleef___vector_float_2 vfloat2;
265 #endif
266 #endif
267
268 #ifdef ENABLE_ZVECTOR2
269 #include "renamezvector2.h"
270 #if !defined(USE_INLINE_HEADER)
271 #define CONFIG 140
272 #include "helpers390x_128.h"
273 typedef Sleef_SLEEF_VECTOR_DOUBLE_2 vdouble2;
274 typedef Sleef_SLEEF_VECTOR_FLOAT_2 vfloat2;
275 #endif
276 #endif
277
278 #ifdef ENABLE_ZVECTOR2NOFMA
279 #include "renamezvector2nofma.h"
280 #if !defined(USE_INLINE_HEADER)
281 #define CONFIG 141
282 #include "helpers390x_128.h"
283 typedef Sleef_SLEEF_VECTOR_DOUBLE_2 vdouble2;
284 typedef Sleef_SLEEF_VECTOR_FLOAT_2 vfloat2;
285 #endif
286 #endif
287
288 #ifdef ENABLE_PUREC_SCALAR
289 #include "renamepurec_scalar.h"
290 #if !defined(USE_INLINE_HEADER)
291 #define CONFIG 1
292 #include "helperpurec_scalar.h"
293 typedef Sleef_double_2 vdouble2;
294 typedef Sleef_float_2 vfloat2;
295 #endif
296 #endif
297
298 #ifdef ENABLE_PURECFMA_SCALAR
299 #include "renamepurecfma_scalar.h"
300 #if !defined(USE_INLINE_HEADER)
301 #define CONFIG 2
302 #include "helperpurec_scalar.h"
303 typedef Sleef_double_2 vdouble2;
304 typedef Sleef_float_2 vfloat2;
305 #endif
306 #endif
307
308 //
309
310 #ifdef ENABLE_DP
check_featureDP(double d)311 int check_featureDP(double d) {
312 double s[VECTLENDP];
313 int i;
314 for(i=0;i<VECTLENDP;i++) {
315 s[i] = d;
316 }
317 vdouble a = vloadu_vd_p(s);
318 a = xpow(a, a);
319 vstoreu_v_p_vd(s, a);
320 return s[0] == s[0];
321 }
322
323 #if !(defined(ENABLE_SVE) || defined(ENABLE_SVENOFMA) || defined(USE_INLINE_HEADER))
vd2getx_vd_vd2(vdouble2 v)324 static vdouble vd2getx_vd_vd2(vdouble2 v) { return v.x; }
vd2gety_vd_vd2(vdouble2 v)325 static vdouble vd2gety_vd_vd2(vdouble2 v) { return v.y; }
326 #endif
327 #else // #ifdef ENABLE_DP
check_featureDP()328 int check_featureDP() { return 0; }
329 #endif // #ifdef ENABLE_DP
330
331 #ifdef ENABLE_SP
check_featureSP(float d)332 int check_featureSP(float d) {
333 float s[VECTLENSP];
334 int i;
335 for(i=0;i<VECTLENSP;i++) {
336 s[i] = d;
337 }
338 vfloat a = vloadu_vf_p(s);
339 a = xpowf(a, a);
340 vstoreu_v_p_vf(s, a);
341 return s[0] == s[0];
342 }
343
344 #if !(defined(ENABLE_SVE) || defined(ENABLE_SVENOFMA) || defined(USE_INLINE_HEADER))
vf2getx_vf_vf2(vfloat2 v)345 static vfloat vf2getx_vf_vf2(vfloat2 v) { return v.x; }
vf2gety_vf_vf2(vfloat2 v)346 static vfloat vf2gety_vf_vf2(vfloat2 v) { return v.y; }
347 #endif
348 #else // #ifdef ENABLE_DP
check_featureSP()349 int check_featureSP() { return 0; }
350 #endif
351
352 //
353
354 #define func_d_d(funcStr, funcName) { \
355 while (startsWith(buf, funcStr " ")) { \
356 uint64_t u; \
357 sscanf(buf, funcStr " %" PRIx64, &u); \
358 double s[VECTLENDP]; \
359 memrand(s, sizeof(s)); \
360 int idx = xrand() & (VECTLENDP-1); \
361 s[idx] = u2d(u); \
362 vdouble a = vloadu_vd_p(s); \
363 a = funcName(a); \
364 vstoreu_v_p_vd(s, a); \
365 u = d2u(s[idx]); \
366 printf("%" PRIx64 "\n", u); \
367 fflush(stdout); \
368 if (fgets(buf, BUFSIZE-1, stdin) == NULL) break; \
369 } \
370 }
371
372 #define func_d2_d(funcStr, funcName) { \
373 while (startsWith(buf, funcStr " ")) { \
374 uint64_t u; \
375 sscanf(buf, funcStr " %" PRIx64, &u); \
376 double s[VECTLENDP], t[VECTLENDP]; \
377 memrand(s, sizeof(s)); \
378 memrand(t, sizeof(t)); \
379 int idx = xrand() & (VECTLENDP-1); \
380 s[idx] = u2d(u); \
381 vdouble2 v; \
382 vdouble a = vloadu_vd_p(s); \
383 v = funcName(a); \
384 vstoreu_v_p_vd(s, vd2getx_vd_vd2(v)); \
385 vstoreu_v_p_vd(t, vd2gety_vd_vd2(v)); \
386 Sleef_double2 d2; \
387 d2.x = s[idx]; \
388 d2.y = t[idx]; \
389 printf("%" PRIx64 " %" PRIx64 "\n", d2u(d2.x), d2u(d2.y)); \
390 fflush(stdout); \
391 if (fgets(buf, BUFSIZE-1, stdin) == NULL) break; \
392 } \
393 }
394
395 #define func_d_d_d(funcStr, funcName) { \
396 while (startsWith(buf, funcStr " ")) { \
397 uint64_t u, v; \
398 sscanf(buf, funcStr " %" PRIx64 " %" PRIx64, &u, &v); \
399 double s[VECTLENDP], t[VECTLENDP]; \
400 memrand(s, sizeof(s)); \
401 memrand(t, sizeof(t)); \
402 int idx = xrand() & (VECTLENDP-1); \
403 s[idx] = u2d(u); \
404 t[idx] = u2d(v); \
405 vdouble a, b; \
406 a = vloadu_vd_p(s); \
407 b = vloadu_vd_p(t); \
408 a = funcName(a, b); \
409 vstoreu_v_p_vd(s, a); \
410 u = d2u(s[idx]); \
411 printf("%" PRIx64 "\n", u); \
412 fflush(stdout); \
413 if (fgets(buf, BUFSIZE-1, stdin) == NULL) break; \
414 } \
415 }
416
417 #define func_d_d_i(funcStr, funcName) { \
418 while (startsWith(buf, funcStr " ")) { \
419 uint64_t u, v; \
420 sscanf(buf, funcStr " %" PRIx64 " %" PRIx64, &u, &v); \
421 double s[VECTLENDP]; \
422 int t[VECTLENDP*2]; \
423 memrand(s, sizeof(s)); \
424 memrand(t, sizeof(t)); \
425 int idx = xrand() & (VECTLENDP-1); \
426 s[idx] = u2d(u); \
427 t[idx] = (int)u2d(v); \
428 vstoreu_v_p_vd(s, funcName(vloadu_vd_p(s), vloadu_vi_p(t))); \
429 u = d2u(s[idx]); \
430 printf("%" PRIx64 "\n", u); \
431 fflush(stdout); \
432 if (fgets(buf, BUFSIZE-1, stdin) == NULL) break; \
433 } \
434 }
435
436 #define func_i_d(funcStr, funcName) { \
437 while (startsWith(buf, funcStr " ")) { \
438 uint64_t u; \
439 int i; \
440 sscanf(buf, funcStr " %" PRIx64, &u); \
441 double s[VECTLENDP]; \
442 int t[VECTLENDP*2]; \
443 memrand(s, sizeof(s)); \
444 memrand(t, sizeof(t)); \
445 int idx = xrand() & (VECTLENDP-1); \
446 s[idx] = u2d(u); \
447 vdouble a = vloadu_vd_p(s); \
448 vint vi = funcName(a); \
449 vstoreu_v_p_vi(t, vi); \
450 i = t[idx]; \
451 printf("%d\n", i); \
452 fflush(stdout); \
453 if (fgets(buf, BUFSIZE-1, stdin) == NULL) break; \
454 } \
455 }
456
457 //
458
459 #define func_f_f(funcStr, funcName) { \
460 while (startsWith(buf, funcStr " ")) { \
461 uint32_t u; \
462 sscanf(buf, funcStr " %x", &u); \
463 float s[VECTLENSP]; \
464 memrand(s, sizeof(s)); \
465 int idx = xrand() & (VECTLENSP-1); \
466 s[idx] = u2f(u); \
467 vfloat a = vloadu_vf_p(s); \
468 a = funcName(a); \
469 vstoreu_v_p_vf(s, a); \
470 u = f2u(s[idx]); \
471 printf("%x\n", u); \
472 fflush(stdout); \
473 if (fgets(buf, BUFSIZE-1, stdin) == NULL) break; \
474 } \
475 }
476
477 #define func_f2_f(funcStr, funcName) { \
478 while (startsWith(buf, funcStr " ")) { \
479 uint32_t u; \
480 sscanf(buf, funcStr " %x", &u); \
481 float s[VECTLENSP], t[VECTLENSP]; \
482 memrand(s, sizeof(s)); \
483 memrand(t, sizeof(t)); \
484 int idx = xrand() & (VECTLENSP-1); \
485 s[idx] = u2f(u); \
486 vfloat2 v; \
487 vfloat a = vloadu_vf_p(s); \
488 v = funcName(a); \
489 vstoreu_v_p_vf(s, vf2getx_vf_vf2(v)); \
490 vstoreu_v_p_vf(t, vf2gety_vf_vf2(v)); \
491 Sleef_float2 d2; \
492 d2.x = s[idx]; \
493 d2.y = t[idx]; \
494 printf("%x %x\n", f2u(d2.x), f2u(d2.y)); \
495 fflush(stdout); \
496 if (fgets(buf, BUFSIZE-1, stdin) == NULL) break; \
497 } \
498 }
499
500 #define func_f_f_f(funcStr, funcName) { \
501 while (startsWith(buf, funcStr " ")) { \
502 uint32_t u, v; \
503 sscanf(buf, funcStr " %x %x", &u, &v); \
504 float s[VECTLENSP], t[VECTLENSP]; \
505 memrand(s, sizeof(s)); \
506 memrand(t, sizeof(t)); \
507 int idx = xrand() & (VECTLENSP-1); \
508 s[idx] = u2f(u); \
509 t[idx] = u2f(v); \
510 vfloat a, b; \
511 a = vloadu_vf_p(s); \
512 b = vloadu_vf_p(t); \
513 a = funcName(a, b); \
514 vstoreu_v_p_vf(s, a); \
515 u = f2u(s[idx]); \
516 printf("%x\n", u); \
517 fflush(stdout); \
518 if (fgets(buf, BUFSIZE-1, stdin) == NULL) break; \
519 } \
520 }
521
522 //
523
524 #define BUFSIZE 1024
525
do_test(int argc,char ** argv)526 int do_test(int argc, char **argv) {
527 xsrand(time(NULL));
528
529 {
530 int k = 0;
531 #ifdef ENABLE_DP
532 k += 1;
533 #endif
534 #ifdef ENABLE_SP
535 k += 2;
536 #endif
537 #if defined(ENABLE_NEON32) || defined(ENABLE_NEON32VFPV4)
538 k += 4; // flush to zero
539 #elif defined(ENABLE_VECEXT)
540 if (vcast_f_vf(xpowf(vcast_vf_f(0.5f), vcast_vf_f(140))) == 0) k += 4;
541 #endif
542 #if defined(DETERMINISTIC)
543 k += 8;
544 #endif
545
546 printf("%d\n", k);
547 fflush(stdout);
548 }
549
550 #if !defined(USE_INLINE_HEADER)
551 fprintf(stderr, "IUT : %s\n", (const char *)xgetPtrf(0));
552 #endif
553 fflush(stderr);
554
555 char buf[BUFSIZE];
556 fgets(buf, BUFSIZE-1, stdin);
557
558 while(!feof(stdin)) {
559 #ifdef ENABLE_DP
560 func_d_d("sin", xsin);
561 func_d_d("cos", xcos);
562 func_d_d("tan", xtan);
563 func_d_d("asin", xasin);
564 func_d_d("acos", xacos);
565 func_d_d("atan", xatan);
566 func_d_d("log", xlog);
567 func_d_d("exp", xexp);
568
569 #ifndef DETERMINISTIC
570 func_d_d("sqrt", xsqrt);
571 func_d_d("sqrt_u05", xsqrt_u05);
572 func_d_d("sqrt_u35", xsqrt_u35);
573 #endif
574 func_d_d("cbrt", xcbrt);
575 func_d_d("cbrt_u1", xcbrt_u1);
576
577 func_d_d("sinh", xsinh);
578 func_d_d("cosh", xcosh);
579 func_d_d("tanh", xtanh);
580 func_d_d("sinh_u35", xsinh_u35);
581 func_d_d("cosh_u35", xcosh_u35);
582 func_d_d("tanh_u35", xtanh_u35);
583 func_d_d("asinh", xasinh);
584 func_d_d("acosh", xacosh);
585 func_d_d("atanh", xatanh);
586
587 func_d_d("sin_u1", xsin_u1);
588 func_d_d("cos_u1", xcos_u1);
589 func_d_d("tan_u1", xtan_u1);
590 func_d_d("sinpi_u05", xsinpi_u05);
591 func_d_d("cospi_u05", xcospi_u05);
592 func_d_d("asin_u1", xasin_u1);
593 func_d_d("acos_u1", xacos_u1);
594 func_d_d("atan_u1", xatan_u1);
595 func_d_d("log_u1", xlog_u1);
596
597 func_d_d("exp2", xexp2);
598 func_d_d("exp10", xexp10);
599 func_d_d("exp2_u35", xexp2_u35);
600 func_d_d("exp10_u35", xexp10_u35);
601 func_d_d("expm1", xexpm1);
602 func_d_d("log10", xlog10);
603 func_d_d("log2", xlog2);
604 func_d_d("log2_u35", xlog2_u35);
605 func_d_d("log1p", xlog1p);
606
607 func_d2_d("sincos", xsincos);
608 func_d2_d("sincos_u1", xsincos_u1);
609 func_d2_d("sincospi_u35", xsincospi_u35);
610 func_d2_d("sincospi_u05", xsincospi_u05);
611
612 func_d_d_d("pow", xpow);
613 func_d_d_d("atan2", xatan2);
614 func_d_d_d("atan2_u1", xatan2_u1);
615
616 func_d_d_i("ldexp", xldexp);
617
618 func_i_d("ilogb", xilogb);
619
620 func_d_d("fabs", xfabs);
621 func_d_d("trunc", xtrunc);
622 func_d_d("floor", xfloor);
623 func_d_d("ceil", xceil);
624 func_d_d("round", xround);
625 func_d_d("rint", xrint);
626 func_d_d("frfrexp", xfrfrexp);
627 func_i_d("expfrexp", xexpfrexp);
628
629 func_d_d_d("hypot_u05", xhypot_u05);
630 func_d_d_d("hypot_u35", xhypot_u35);
631 func_d_d_d("copysign", xcopysign);
632 func_d_d_d("fmax", xfmax);
633 func_d_d_d("fmin", xfmin);
634 func_d_d_d("fdim", xfdim);
635 func_d_d_d("nextafter", xnextafter);
636 func_d_d_d("fmod", xfmod);
637 func_d_d_d("remainder", xremainder);
638
639 func_d2_d("modf", xmodf);
640
641 func_d_d("tgamma_u1", xtgamma_u1);
642 func_d_d("lgamma_u1", xlgamma_u1);
643 func_d_d("erf_u1", xerf_u1);
644 func_d_d("erfc_u15", xerfc_u15);
645 #endif
646
647 #ifdef ENABLE_SP
648 func_f_f("sinf", xsinf);
649 func_f_f("cosf", xcosf);
650 func_f_f("tanf", xtanf);
651 func_f_f("asinf", xasinf);
652 func_f_f("acosf", xacosf);
653 func_f_f("atanf", xatanf);
654 func_f_f("logf", xlogf);
655 func_f_f("expf", xexpf);
656
657 #ifndef DETERMINISTIC
658 func_f_f("sqrtf", xsqrtf);
659 func_f_f("sqrtf_u05", xsqrtf_u05);
660 func_f_f("sqrtf_u35", xsqrtf_u35);
661 #endif
662 func_f_f("cbrtf", xcbrtf);
663 func_f_f("cbrtf_u1", xcbrtf_u1);
664
665 func_f_f("sinhf", xsinhf);
666 func_f_f("coshf", xcoshf);
667 func_f_f("tanhf", xtanhf);
668 func_f_f("sinhf_u35", xsinhf_u35);
669 func_f_f("coshf_u35", xcoshf_u35);
670 func_f_f("tanhf_u35", xtanhf_u35);
671 func_f_f("asinhf", xasinhf);
672 func_f_f("acoshf", xacoshf);
673 func_f_f("atanhf", xatanhf);
674
675 func_f_f("sinf_u1", xsinf_u1);
676 func_f_f("cosf_u1", xcosf_u1);
677 func_f_f("tanf_u1", xtanf_u1);
678 func_f_f("sinpif_u05", xsinpif_u05);
679 func_f_f("cospif_u05", xcospif_u05);
680 func_f_f("asinf_u1", xasinf_u1);
681 func_f_f("acosf_u1", xacosf_u1);
682 func_f_f("atanf_u1", xatanf_u1);
683 func_f_f("logf_u1", xlogf_u1);
684
685 func_f_f("exp2f", xexp2f);
686 func_f_f("exp10f", xexp10f);
687 func_f_f("exp2f_u35", xexp2f_u35);
688 func_f_f("exp10f_u35", xexp10f_u35);
689 func_f_f("expm1f", xexpm1f);
690 func_f_f("log10f", xlog10f);
691 func_f_f("log2f", xlog2f);
692 func_f_f("log2f_u35", xlog2f_u35);
693 func_f_f("log1pf", xlog1pf);
694
695 func_f2_f("sincosf", xsincosf);
696 func_f2_f("sincosf_u1", xsincosf_u1);
697 func_f2_f("sincospif_u35", xsincospif_u35);
698 func_f2_f("sincospif_u05", xsincospif_u05);
699
700 func_f_f_f("powf", xpowf);
701 func_f_f_f("atan2f", xatan2f);
702 func_f_f_f("atan2f_u1", xatan2f_u1);
703
704 func_f_f("fabsf", xfabsf);
705 func_f_f("truncf", xtruncf);
706 func_f_f("floorf", xfloorf);
707 func_f_f("ceilf", xceilf);
708 func_f_f("roundf", xroundf);
709 func_f_f("rintf", xrintf);
710 func_f_f("frfrexpf", xfrfrexpf);
711
712 func_f_f_f("hypotf_u05", xhypotf_u05);
713 func_f_f_f("hypotf_u35", xhypotf_u35);
714 func_f_f_f("copysignf", xcopysignf);
715 func_f_f_f("fmaxf", xfmaxf);
716 func_f_f_f("fminf", xfminf);
717 func_f_f_f("fdimf", xfdimf);
718 func_f_f_f("nextafterf", xnextafterf);
719 func_f_f_f("fmodf", xfmodf);
720 func_f_f_f("remainderf", xremainderf);
721
722 func_f2_f("modff", xmodff);
723
724 func_f_f("tgammaf_u1", xtgammaf_u1);
725 func_f_f("lgammaf_u1", xlgammaf_u1);
726 func_f_f("erff_u1", xerff_u1);
727 func_f_f("erfcf_u15", xerfcf_u15);
728
729 func_f_f("fastsinf_u3500", xfastsinf_u3500);
730 func_f_f("fastcosf_u3500", xfastcosf_u3500);
731 func_f_f_f("fastpowf_u3500", xfastpowf_u3500);
732 #endif
733 }
734
735 return 0;
736 }
737