| ... |
... |
@@ -54,6 +54,8 @@ extern float cr_hypotf(float, float); |
|
54
|
54
|
extern float cr_log1pf(float);
|
|
55
|
55
|
extern float cr_expm1f(float);
|
|
56
|
56
|
extern void cr_sincosf(float, float *, float *);
|
|
|
57
|
+#else
|
|
|
58
|
+#include "openlibm_math.h"
|
|
57
|
59
|
#endif
|
|
58
|
60
|
|
|
59
|
61
|
|
| ... |
... |
@@ -348,7 +350,7 @@ lisp_sinf(float x) |
|
348
|
350
|
#ifdef FEATURE_CORE_MATH
|
|
349
|
351
|
return cr_sinf(x);
|
|
350
|
352
|
#else
|
|
351
|
|
- return (float) fdlibm_sin((double) x);
|
|
|
353
|
+ return sinf(x);
|
|
352
|
354
|
#endif
|
|
353
|
355
|
}
|
|
354
|
356
|
|
| ... |
... |
@@ -358,7 +360,7 @@ lisp_cosf(float x) |
|
358
|
360
|
#ifdef FEATURE_CORE_MATH
|
|
359
|
361
|
return cr_cosf(x);
|
|
360
|
362
|
#else
|
|
361
|
|
- return (float) fdlibm_cos((double) x);
|
|
|
363
|
+ return cosf(x);
|
|
362
|
364
|
#endif
|
|
363
|
365
|
}
|
|
364
|
366
|
|
| ... |
... |
@@ -368,7 +370,7 @@ lisp_tanf(float x) |
|
368
|
370
|
#ifdef FEATURE_CORE_MATH
|
|
369
|
371
|
return cr_tanf(x);
|
|
370
|
372
|
#else
|
|
371
|
|
- return (float) fdlibm_tan((double) x);
|
|
|
373
|
+ return tanf(x);
|
|
372
|
374
|
#endif
|
|
373
|
375
|
}
|
|
374
|
376
|
|
| ... |
... |
@@ -378,7 +380,7 @@ lisp_atanf(float x) |
|
378
|
380
|
#ifdef FEATURE_CORE_MATH
|
|
379
|
381
|
return cr_atanf(x);
|
|
380
|
382
|
#else
|
|
381
|
|
- return (float) fdlibm_atan((double) x);
|
|
|
383
|
+ return atanf(x);
|
|
382
|
384
|
#endif
|
|
383
|
385
|
}
|
|
384
|
386
|
|
| ... |
... |
@@ -388,7 +390,7 @@ lisp_atan2f(float y, float x) |
|
388
|
390
|
#ifdef FEATURE_CORE_MATH
|
|
389
|
391
|
return cr_atan2f(y, x);
|
|
390
|
392
|
#else
|
|
391
|
|
- return (float) __ieee754_atan2((double) y, (double) x);
|
|
|
393
|
+ return atan2f(y, x);
|
|
392
|
394
|
#endif
|
|
393
|
395
|
}
|
|
394
|
396
|
|
| ... |
... |
@@ -398,7 +400,7 @@ lisp_asinf(float x) |
|
398
|
400
|
#ifdef FEATURE_CORE_MATH
|
|
399
|
401
|
return cr_asinf(x);
|
|
400
|
402
|
#else
|
|
401
|
|
- return (float) __ieee754_asin((double) x);
|
|
|
403
|
+ return asinf(x);
|
|
402
|
404
|
#endif
|
|
403
|
405
|
}
|
|
404
|
406
|
|
| ... |
... |
@@ -408,7 +410,7 @@ lisp_acosf(float x) |
|
408
|
410
|
#ifdef FEATURE_CORE_MATH
|
|
409
|
411
|
return cr_acosf(x);
|
|
410
|
412
|
#else
|
|
411
|
|
- return (float) __ieee754_acos((double) x);
|
|
|
413
|
+ return acosf(x);
|
|
412
|
414
|
#endif
|
|
413
|
415
|
}
|
|
414
|
416
|
|
| ... |
... |
@@ -418,7 +420,7 @@ lisp_sinhf(float x) |
|
418
|
420
|
#ifdef FEATURE_CORE_MATH
|
|
419
|
421
|
return cr_sinhf(x);
|
|
420
|
422
|
#else
|
|
421
|
|
- return (float) __ieee754_sinh((double) x);
|
|
|
423
|
+ return sinhf(x);
|
|
422
|
424
|
#endif
|
|
423
|
425
|
}
|
|
424
|
426
|
|
| ... |
... |
@@ -428,7 +430,7 @@ lisp_coshf(float x) |
|
428
|
430
|
#ifdef FEATURE_CORE_MATH
|
|
429
|
431
|
return cr_coshf(x);
|
|
430
|
432
|
#else
|
|
431
|
|
- return (float) __ieee754_cosh((double) x);
|
|
|
433
|
+ return coshf(x);
|
|
432
|
434
|
#endif
|
|
433
|
435
|
}
|
|
434
|
436
|
|
| ... |
... |
@@ -438,7 +440,7 @@ lisp_tanhf(float x) |
|
438
|
440
|
#ifdef FEATURE_CORE_MATH
|
|
439
|
441
|
return cr_tanhf(x);
|
|
440
|
442
|
#else
|
|
441
|
|
- return (float) fdlibm_tanh((double) x);
|
|
|
443
|
+ return tanhf(x);
|
|
442
|
444
|
#endif
|
|
443
|
445
|
}
|
|
444
|
446
|
|
| ... |
... |
@@ -448,7 +450,7 @@ lisp_asinhf(float x) |
|
448
|
450
|
#ifdef FEATURE_CORE_MATH
|
|
449
|
451
|
return cr_asinhf(x);
|
|
450
|
452
|
#else
|
|
451
|
|
- return (float) fdlibm_asinh((double) x);
|
|
|
453
|
+ return asinhf((double) x);
|
|
452
|
454
|
#endif
|
|
453
|
455
|
}
|
|
454
|
456
|
|
| ... |
... |
@@ -458,7 +460,7 @@ lisp_acoshf(float x) |
|
458
|
460
|
#ifdef FEATURE_CORE_MATH
|
|
459
|
461
|
return cr_acoshf(x);
|
|
460
|
462
|
#else
|
|
461
|
|
- return (float) __ieee754_acosh((double) x);
|
|
|
463
|
+ return acoshf(x);
|
|
462
|
464
|
#endif
|
|
463
|
465
|
}
|
|
464
|
466
|
|
| ... |
... |
@@ -468,7 +470,7 @@ lisp_atanhf(float x) |
|
468
|
470
|
#ifdef FEATURE_CORE_MATH
|
|
469
|
471
|
return cr_atanhf(x);
|
|
470
|
472
|
#else
|
|
471
|
|
- return (float) __ieee754_atanh((double) x);
|
|
|
473
|
+ return atanhf(x);
|
|
472
|
474
|
#endif
|
|
473
|
475
|
}
|
|
474
|
476
|
|
| ... |
... |
@@ -478,7 +480,7 @@ lisp_expf(float x) |
|
478
|
480
|
#ifdef FEATURE_CORE_MATH
|
|
479
|
481
|
return cr_expf(x);
|
|
480
|
482
|
#else
|
|
481
|
|
- return (float) __ieee754_exp((double) x);
|
|
|
483
|
+ return expf(x);
|
|
482
|
484
|
#endif
|
|
483
|
485
|
}
|
|
484
|
486
|
|
| ... |
... |
@@ -488,7 +490,7 @@ lisp_logf(float x) |
|
488
|
490
|
#ifdef FEATURE_CORE_MATH
|
|
489
|
491
|
return cr_logf(x);
|
|
490
|
492
|
#else
|
|
491
|
|
- return (float) __ieee754_log((double) x);
|
|
|
493
|
+ return log(x);
|
|
492
|
494
|
#endif
|
|
493
|
495
|
}
|
|
494
|
496
|
|
| ... |
... |
@@ -498,7 +500,7 @@ lisp_log10f(float x) |
|
498
|
500
|
#ifdef FEATURE_CORE_MATH
|
|
499
|
501
|
return cr_log10f(x);
|
|
500
|
502
|
#else
|
|
501
|
|
- return (float) __ieee754_log10((double) x);
|
|
|
503
|
+ return log10f(x);
|
|
502
|
504
|
#endif
|
|
503
|
505
|
}
|
|
504
|
506
|
|
| ... |
... |
@@ -520,7 +522,7 @@ lisp_powf(float x, float y) |
|
520
|
522
|
* just use fdlibm for now until we can figure out what's causing
|
|
521
|
523
|
* the failure.
|
|
522
|
524
|
*/
|
|
523
|
|
- return (float) __ieee754_pow((double) x, (double) y);
|
|
|
525
|
+ return pow(x, y);
|
|
524
|
526
|
#endif
|
|
525
|
527
|
}
|
|
526
|
528
|
|
| ... |
... |
@@ -530,7 +532,7 @@ lisp_hypotf(float x, float y) |
|
530
|
532
|
#ifdef FEATURE_CORE_MATH
|
|
531
|
533
|
return cr_hypotf(x, y);
|
|
532
|
534
|
#else
|
|
533
|
|
- return (float) __ieee754_hypot((double) x, (double) y);
|
|
|
535
|
+ return hypotf(x, y);
|
|
534
|
536
|
#endif
|
|
535
|
537
|
}
|
|
536
|
538
|
|
| ... |
... |
@@ -540,7 +542,7 @@ lisp_log1pf(float x) |
|
540
|
542
|
#ifdef FEATURE_CORE_MATH
|
|
541
|
543
|
return cr_log1pf(x);
|
|
542
|
544
|
#else
|
|
543
|
|
- return (float) fdlibm_log1p((double) x);
|
|
|
545
|
+ return log1pf(x);
|
|
544
|
546
|
#endif
|
|
545
|
547
|
}
|
|
546
|
548
|
|
| ... |
... |
@@ -550,7 +552,7 @@ lisp_expm1f(float x) |
|
550
|
552
|
#ifdef FEATURE_CORE_MATH
|
|
551
|
553
|
return cr_expm1f(x);
|
|
552
|
554
|
#else
|
|
553
|
|
- return (float) fdlibm_expm1((double) x);
|
|
|
555
|
+ return expm1f(x);
|
|
554
|
556
|
#endif
|
|
555
|
557
|
}
|
|
556
|
558
|
|
| ... |
... |
@@ -560,11 +562,8 @@ lisp_sincosf(float x, float *s, float *c) |
|
560
|
562
|
#ifdef FEATURE_CORE_MATH
|
|
561
|
563
|
cr_sincosf(x, s, c);
|
|
562
|
564
|
#else
|
|
563
|
|
- extern void cmucl_sincos(double, double*, double*);
|
|
564
|
|
- double ds, dc;
|
|
565
|
|
-
|
|
566
|
|
- cmucl_sincos((double) x, &ds, &dc);
|
|
567
|
|
- *s = (float) ds;
|
|
568
|
|
- *c = (float) dc;
|
|
|
565
|
+ extern void sincosf(float x, float *s, float *c);
|
|
|
566
|
+
|
|
|
567
|
+ sincosf(x, s, c);
|
|
569
|
568
|
#endif
|
|
570
|
569
|
} |