| ... |
... |
@@ -56,6 +56,31 @@ extern float cr_expm1f(float); |
|
56
|
56
|
extern void cr_sincosf(float, float *, float *);
|
|
57
|
57
|
#else
|
|
58
|
58
|
#include "openlibm_math.h"
|
|
|
59
|
+/*
|
|
|
60
|
+ * Declare the openlibm functions we use. This is needed because we
|
|
|
61
|
+ * changed the names of the openlibm functions.
|
|
|
62
|
+ */
|
|
|
63
|
+extern float openlibm_asinhf(float);
|
|
|
64
|
+extern float openlibm_atanf(float);
|
|
|
65
|
+extern float openlibm_cosf(float);
|
|
|
66
|
+extern float openlibm_expm1f(float);
|
|
|
67
|
+extern float openlibm_log1pf(float);
|
|
|
68
|
+extern float openlibm_sinf(float);
|
|
|
69
|
+extern float openlibm_tanf(float);
|
|
|
70
|
+extern float openlibm_tanhf(float);
|
|
|
71
|
+extern void openlibm_sincosf(float, float*, float*);
|
|
|
72
|
+extern float __ieee754_acosf(float);
|
|
|
73
|
+extern float __ieee754_acoshf(float);
|
|
|
74
|
+extern float __ieee754_logf(float);
|
|
|
75
|
+extern float __ieee754_atanhf(float);
|
|
|
76
|
+extern float __ieee754_asinf(float);
|
|
|
77
|
+extern float __ieee754_atan2f(float, float);
|
|
|
78
|
+extern float __ieee754_expf(float);
|
|
|
79
|
+extern float __ieee754_coshf(float);
|
|
|
80
|
+extern float __ieee754_log10f(float);
|
|
|
81
|
+extern float __ieee754_sinhf(float);
|
|
|
82
|
+extern float __ieee754_hypotf(float, float);
|
|
|
83
|
+
|
|
59
|
84
|
#endif
|
|
60
|
85
|
|
|
61
|
86
|
|
| ... |
... |
@@ -350,7 +375,7 @@ lisp_sinf(float x) |
|
350
|
375
|
#ifdef FEATURE_CORE_MATH
|
|
351
|
376
|
return cr_sinf(x);
|
|
352
|
377
|
#else
|
|
353
|
|
- return sinf(x);
|
|
|
378
|
+ return openlibm_sinf(x);
|
|
354
|
379
|
#endif
|
|
355
|
380
|
}
|
|
356
|
381
|
|
| ... |
... |
@@ -360,7 +385,7 @@ lisp_cosf(float x) |
|
360
|
385
|
#ifdef FEATURE_CORE_MATH
|
|
361
|
386
|
return cr_cosf(x);
|
|
362
|
387
|
#else
|
|
363
|
|
- return cosf(x);
|
|
|
388
|
+ return openlibm_cosf(x);
|
|
364
|
389
|
#endif
|
|
365
|
390
|
}
|
|
366
|
391
|
|
| ... |
... |
@@ -370,7 +395,7 @@ lisp_tanf(float x) |
|
370
|
395
|
#ifdef FEATURE_CORE_MATH
|
|
371
|
396
|
return cr_tanf(x);
|
|
372
|
397
|
#else
|
|
373
|
|
- return tanf(x);
|
|
|
398
|
+ return openlibm_tanf(x);
|
|
374
|
399
|
#endif
|
|
375
|
400
|
}
|
|
376
|
401
|
|
| ... |
... |
@@ -380,7 +405,7 @@ lisp_atanf(float x) |
|
380
|
405
|
#ifdef FEATURE_CORE_MATH
|
|
381
|
406
|
return cr_atanf(x);
|
|
382
|
407
|
#else
|
|
383
|
|
- return atanf(x);
|
|
|
408
|
+ return openlibm_atanf(x);
|
|
384
|
409
|
#endif
|
|
385
|
410
|
}
|
|
386
|
411
|
|
| ... |
... |
@@ -390,7 +415,7 @@ lisp_atan2f(float y, float x) |
|
390
|
415
|
#ifdef FEATURE_CORE_MATH
|
|
391
|
416
|
return cr_atan2f(y, x);
|
|
392
|
417
|
#else
|
|
393
|
|
- return atan2f(y, x);
|
|
|
418
|
+ return __ieee754_atan2f(y, x);
|
|
394
|
419
|
#endif
|
|
395
|
420
|
}
|
|
396
|
421
|
|
| ... |
... |
@@ -400,7 +425,7 @@ lisp_asinf(float x) |
|
400
|
425
|
#ifdef FEATURE_CORE_MATH
|
|
401
|
426
|
return cr_asinf(x);
|
|
402
|
427
|
#else
|
|
403
|
|
- return asinf(x);
|
|
|
428
|
+ return __ieee754_asinf(x);
|
|
404
|
429
|
#endif
|
|
405
|
430
|
}
|
|
406
|
431
|
|
| ... |
... |
@@ -410,7 +435,7 @@ lisp_acosf(float x) |
|
410
|
435
|
#ifdef FEATURE_CORE_MATH
|
|
411
|
436
|
return cr_acosf(x);
|
|
412
|
437
|
#else
|
|
413
|
|
- return acosf(x);
|
|
|
438
|
+ return __ieee754_acosf(x);
|
|
414
|
439
|
#endif
|
|
415
|
440
|
}
|
|
416
|
441
|
|
| ... |
... |
@@ -420,7 +445,7 @@ lisp_sinhf(float x) |
|
420
|
445
|
#ifdef FEATURE_CORE_MATH
|
|
421
|
446
|
return cr_sinhf(x);
|
|
422
|
447
|
#else
|
|
423
|
|
- return sinhf(x);
|
|
|
448
|
+ return __ieee754_sinhf(x);
|
|
424
|
449
|
#endif
|
|
425
|
450
|
}
|
|
426
|
451
|
|
| ... |
... |
@@ -430,7 +455,7 @@ lisp_coshf(float x) |
|
430
|
455
|
#ifdef FEATURE_CORE_MATH
|
|
431
|
456
|
return cr_coshf(x);
|
|
432
|
457
|
#else
|
|
433
|
|
- return coshf(x);
|
|
|
458
|
+ return __ieee754_coshf(x);
|
|
434
|
459
|
#endif
|
|
435
|
460
|
}
|
|
436
|
461
|
|
| ... |
... |
@@ -440,7 +465,7 @@ lisp_tanhf(float x) |
|
440
|
465
|
#ifdef FEATURE_CORE_MATH
|
|
441
|
466
|
return cr_tanhf(x);
|
|
442
|
467
|
#else
|
|
443
|
|
- return tanhf(x);
|
|
|
468
|
+ return openlibm_tanhf(x);
|
|
444
|
469
|
#endif
|
|
445
|
470
|
}
|
|
446
|
471
|
|
| ... |
... |
@@ -450,7 +475,7 @@ lisp_asinhf(float x) |
|
450
|
475
|
#ifdef FEATURE_CORE_MATH
|
|
451
|
476
|
return cr_asinhf(x);
|
|
452
|
477
|
#else
|
|
453
|
|
- return asinhf((double) x);
|
|
|
478
|
+ return openlibm_asinhf((double) x);
|
|
454
|
479
|
#endif
|
|
455
|
480
|
}
|
|
456
|
481
|
|
| ... |
... |
@@ -460,7 +485,7 @@ lisp_acoshf(float x) |
|
460
|
485
|
#ifdef FEATURE_CORE_MATH
|
|
461
|
486
|
return cr_acoshf(x);
|
|
462
|
487
|
#else
|
|
463
|
|
- return acoshf(x);
|
|
|
488
|
+ return __ieee754_acoshf(x);
|
|
464
|
489
|
#endif
|
|
465
|
490
|
}
|
|
466
|
491
|
|
| ... |
... |
@@ -470,7 +495,7 @@ lisp_atanhf(float x) |
|
470
|
495
|
#ifdef FEATURE_CORE_MATH
|
|
471
|
496
|
return cr_atanhf(x);
|
|
472
|
497
|
#else
|
|
473
|
|
- return atanhf(x);
|
|
|
498
|
+ return __ieee754_atanhf(x);
|
|
474
|
499
|
#endif
|
|
475
|
500
|
}
|
|
476
|
501
|
|
| ... |
... |
@@ -480,7 +505,7 @@ lisp_expf(float x) |
|
480
|
505
|
#ifdef FEATURE_CORE_MATH
|
|
481
|
506
|
return cr_expf(x);
|
|
482
|
507
|
#else
|
|
483
|
|
- return expf(x);
|
|
|
508
|
+ return __ieee754_expf(x);
|
|
484
|
509
|
#endif
|
|
485
|
510
|
}
|
|
486
|
511
|
|
| ... |
... |
@@ -490,7 +515,7 @@ lisp_logf(float x) |
|
490
|
515
|
#ifdef FEATURE_CORE_MATH
|
|
491
|
516
|
return cr_logf(x);
|
|
492
|
517
|
#else
|
|
493
|
|
- return log(x);
|
|
|
518
|
+ return __ieee754_log(x);
|
|
494
|
519
|
#endif
|
|
495
|
520
|
}
|
|
496
|
521
|
|
| ... |
... |
@@ -500,7 +525,7 @@ lisp_log10f(float x) |
|
500
|
525
|
#ifdef FEATURE_CORE_MATH
|
|
501
|
526
|
return cr_log10f(x);
|
|
502
|
527
|
#else
|
|
503
|
|
- return log10f(x);
|
|
|
528
|
+ return __ieee754_log10f(x);
|
|
504
|
529
|
#endif
|
|
505
|
530
|
}
|
|
506
|
531
|
|
| ... |
... |
@@ -532,7 +557,7 @@ lisp_hypotf(float x, float y) |
|
532
|
557
|
#ifdef FEATURE_CORE_MATH
|
|
533
|
558
|
return cr_hypotf(x, y);
|
|
534
|
559
|
#else
|
|
535
|
|
- return hypotf(x, y);
|
|
|
560
|
+ return __ieee754_hypotf(x, y);
|
|
536
|
561
|
#endif
|
|
537
|
562
|
}
|
|
538
|
563
|
|
| ... |
... |
@@ -542,7 +567,7 @@ lisp_log1pf(float x) |
|
542
|
567
|
#ifdef FEATURE_CORE_MATH
|
|
543
|
568
|
return cr_log1pf(x);
|
|
544
|
569
|
#else
|
|
545
|
|
- return log1pf(x);
|
|
|
570
|
+ return openlibm_log1pf(x);
|
|
546
|
571
|
#endif
|
|
547
|
572
|
}
|
|
548
|
573
|
|
| ... |
... |
@@ -552,7 +577,7 @@ lisp_expm1f(float x) |
|
552
|
577
|
#ifdef FEATURE_CORE_MATH
|
|
553
|
578
|
return cr_expm1f(x);
|
|
554
|
579
|
#else
|
|
555
|
|
- return expm1f(x);
|
|
|
580
|
+ return openlibm_expm1f(x);
|
|
556
|
581
|
#endif
|
|
557
|
582
|
}
|
|
558
|
583
|
|
| ... |
... |
@@ -562,8 +587,8 @@ lisp_sincosf(float x, float *s, float *c) |
|
562
|
587
|
#ifdef FEATURE_CORE_MATH
|
|
563
|
588
|
cr_sincosf(x, s, c);
|
|
564
|
589
|
#else
|
|
565
|
|
- extern void sincosf(float x, float *s, float *c);
|
|
|
590
|
+ extern void openlibm_sincosf(float x, float *s, float *c);
|
|
566
|
591
|
|
|
567
|
|
- sincosf(x, s, c);
|
|
|
592
|
+ openlibm_sincosf(x, s, c);
|
|
568
|
593
|
#endif
|
|
569
|
594
|
} |