Rudiments: /home/dmuse/temp/rudiments/include/rudiments/private/mathinlines.h Source File

Rudiments

mathinlines.h
1 #include <math.h>
2 #include <tgmath.h>
3 #undef remainder
4 #undef floor
5 #undef round
6
7 RUDIMENTS_INLINE int32_t math::absoluteValue(int32_t j) {
8 // FIXME: use abs on platforms where an int is 32 bits
9 return labs(j);
10 }
11
12 RUDIMENTS_INLINE div_t math::divide(int32_t numer, int32_t denom) {
13 // FIXME: use div on platforms where an int is 32 bits
14 return ldiv(numer,denom);
15 }
16
17 RUDIMENTS_INLINE int64_t math::absoluteValue(int64_t j) {
18 return llabs(j);
19 }
20
21 RUDIMENTS_INLINE lldiv_t math::divide(int64_t numer, int64_t denom) {
22 return lldiv(numer,denom);
23 }
24
25
26
27
28 // float methods
29
30 RUDIMENTS_INLINE bool math::isFinite(float x) {
31 return isfinite(x);
32 }
33
34 RUDIMENTS_INLINE bool math::isNormal(float x) {
35 return isnormal(x);
36 }
37
38 RUDIMENTS_INLINE bool math::isSubNormal(float x) {
39 return (fpclassify(x)==FP_SUBNORMAL);
40 }
41
42 RUDIMENTS_INLINE bool math::isNaN(float x) {
43 return isnan(x);
44 }
45
46 RUDIMENTS_INLINE bool math::isInfinite(float x) {
47 return isinf(x);
48 }
49
50 RUDIMENTS_INLINE bool math::isGreater(float x, float y) {
51 return isgreater(x,y);
52 }
53
54 RUDIMENTS_INLINE bool math::isGreaterOrEqual(float x, float y) {
55 return isgreaterequal(x,y);
56 }
57
58 RUDIMENTS_INLINE bool math::isLess(float x, float y) {
59 return isless(x,y);
60 }
61
62 RUDIMENTS_INLINE bool math::isLessOrEqual(float x, float y) {
63 return islessequal(x,y);
64 }
65
66 RUDIMENTS_INLINE bool math::isLessOrGreater(float x, float y) {
67 return islessgreater(x,y);
68 }
69
70 RUDIMENTS_INLINE bool math::areNaN(float x, float y) {
71 return isunordered(x,y);
72 }
73
74 RUDIMENTS_INLINE bool math::isSignBitSet(float x) {
75 return signbit(x);
76 }
77
78 RUDIMENTS_INLINE float math::arcCosine(float x) {
79 return acosf(x);
80 }
81
82 RUDIMENTS_INLINE float math::arcSine(float x) {
83 return asinf(x);
84 }
85
86 RUDIMENTS_INLINE float math::arcTangent(float x) {
87 return atanf(x);
88 }
89
90 RUDIMENTS_INLINE float math::arcTangent(float y, float x) {
91 return atan2f(y,x);
92 }
93
94 RUDIMENTS_INLINE float math::cosine(float x) {
95 return cosf(x);
96 }
97
98 RUDIMENTS_INLINE float math::sine(float x) {
99 return sinf(x);
100 }
101
102 RUDIMENTS_INLINE float math::tangent(float x) {
103 return tanf(x);
104 }
105
106 RUDIMENTS_INLINE float math::hyperbolicArcCosine(float x) {
107 return acoshf(x);
108 }
109
110 RUDIMENTS_INLINE float math::hyperbolicArcSine(float x) {
111 return asinhf(x);
112 }
113
114 RUDIMENTS_INLINE float math::hyperbolicArcTangent(float x) {
115 return atanhf(x);
116 }
117
118 RUDIMENTS_INLINE float math::hyperbolicCosine(float x) {
119 return coshf(x);
120 }
121
122 RUDIMENTS_INLINE float math::hyperbolicSine(float x) {
123 return sinhf(x);
124 }
125
126 RUDIMENTS_INLINE float math::hyperbolicTangent(float x) {
127 return tanhf(x);
128 }
129
130 RUDIMENTS_INLINE float math::naturalExponent(float x) {
131 return expf(x);
132 }
133
134 RUDIMENTS_INLINE float math::normalize(float x, int32_t *exp) {
135 return frexpf(x,exp);
136 }
137
138 RUDIMENTS_INLINE float math::naturalLog(float x) {
139 return logf(x);
140 }
141
142 RUDIMENTS_INLINE float math::logBase10(float x) {
143 return log10f(x);
144 }
145
146 RUDIMENTS_INLINE float math::naturalExponentMinusOne(float x) {
147 return expm1f(x);
148 }
149
150 RUDIMENTS_INLINE float math::naturalLogPlusOne(float x) {
151 return log1pf(x);
152 }
153
154 RUDIMENTS_INLINE float math::exponent(float x) {
155 return logbf(x);
156 }
157
158 RUDIMENTS_INLINE float math::exponentBase2(float x) {
159 return exp2f(x);
160 }
161
162 RUDIMENTS_INLINE float math::logBase2(float x) {
163 return log2f(x);
164 }
165
166 RUDIMENTS_INLINE float math::power(float x, float y) {
167 return powf(x,y);
168 }
169
170 RUDIMENTS_INLINE float math::squareRoot(float x) {
171 return sqrtf(x);
172 }
173
174 RUDIMENTS_INLINE float math::hypotenuse(float x, float y) {
175 return hypotf(x,y);
176 }
177
178 RUDIMENTS_INLINE float math::cubeRoot(float x) {
179 return cbrtf(x);
180 }
181
182 RUDIMENTS_INLINE float math::ceiling(float x) {
183 return ceilf(x);
184 }
185
186 RUDIMENTS_INLINE float math::absoluteValue(float x) {
187 return fabsf(x);
188 }
189
190 RUDIMENTS_INLINE float math::floor(float x) {
191 return floorf(x);
192 }
193
194 RUDIMENTS_INLINE float math::remainder(float x, float y) {
195 return fmodf(x,y);
196 }
197
198 RUDIMENTS_INLINE float math::nearbyInteger(float x) {
199 return nearbyintf(x);
200 }
201
202 RUDIMENTS_INLINE float math::round(float x) {
203 return roundf(x);
204 }
205
206 RUDIMENTS_INLINE float math::truncate(float x) {
207 return truncf(x);
208 }
209
210 RUDIMENTS_INLINE float math::remainder(float x, float y, int32_t *quo) {
211 return remquof(x,y,quo);
212 }
213
214 RUDIMENTS_INLINE long math::roundToLong(float x) {
215 return lrintf(x);
216 }
217
218 RUDIMENTS_INLINE int64_t math::roundToLongLong(float x) {
219 return llrintf(x);
220 }
221
222 RUDIMENTS_INLINE long math::roundAwayFromZeroToLong(float x) {
223 return lroundf(x);
224 }
225
226 RUDIMENTS_INLINE int64_t math::roundAwayFromZeroToLongLong(float x) {
227 return llroundf(x);
228 }
229
230 RUDIMENTS_INLINE float math::copySignBit(float x, float y) {
231 return copysignf(x,y);
232 }
233
234 RUDIMENTS_INLINE float math::errorFunction(float x) {
235 return erff(x);
236 }
237
238 RUDIMENTS_INLINE float math::complementaryErrorFunction(float x) {
239 return erfcf(x);
240 }
241
242 RUDIMENTS_INLINE float math::trueGamma(float x) {
243 return tgammaf(x);
244 }
245
246 RUDIMENTS_INLINE float math::naturalLogGamma(float x) {
247 return lgammaf(x);
248 }
249
250 RUDIMENTS_INLINE float math::roundInexact(float x) {
251 return rintf(x);
252 }
253
254 RUDIMENTS_INLINE float math::nextAfter(float x, float y) {
255 return nextafterf(x,y);
256 }
257
258 RUDIMENTS_INLINE float math::nextToward(float x, float y) {
259 return nexttowardf(x,y);
260 }
261
262 RUDIMENTS_INLINE float math::scaleByRadixToPower(float x, float n) {
263 return scalbf(x,n);
264 }
265
266 RUDIMENTS_INLINE float math::scaleByRadixToPower(float x, int32_t n) {
267 return scalbnf(x,n);
268 }
269
270 RUDIMENTS_INLINE float math::scaleByRadixToPower(float x, long n) {
271 return scalblnf(x,n);
272 }
273
274 RUDIMENTS_INLINE int32_t math::integralExponent(float x) {
275 return ilogbf(x);
276 }
277
278 RUDIMENTS_INLINE float math::positiveDifference(float x, float y) {
279 return fdimf(x,y);
280 }
281
282 RUDIMENTS_INLINE float math::larger(float x, float y) {
283 return fmaxf(x,y);
284 }
285
286 RUDIMENTS_INLINE float math::smaller(float x, float y) {
287 return fminf(x,y);
288 }
289
290 RUDIMENTS_INLINE float math::multiplyAndAdd(float x, float y, float z) {
291 return fmaf(x,y,z);
292 }
293
294 RUDIMENTS_INLINE float math::argument(float complex z) {
295 return cargf(z);
296 }
297
298 RUDIMENTS_INLINE float complex math::conjugate(float complex z) {
299 return conjf(z);
300 }
301
302 RUDIMENTS_INLINE float complex math::project(float complex z) {
303 return cprojf(z);
304 }
305
306 RUDIMENTS_INLINE float math::imaginary(float complex z) {
307 return cimagf(z);
308 }
309
310 RUDIMENTS_INLINE float math::real(float complex z) {
311 return crealf(z);
312 }
313
314
315
316 // double methods
317
318 RUDIMENTS_INLINE bool math::isFinite(double x) {
319 return isfinite(x);
320 }
321
322 RUDIMENTS_INLINE bool math::isNormal(double x) {
323 return isnormal(x);
324 }
325
326 RUDIMENTS_INLINE bool math::isSubNormal(double x) {
327 return (fpclassify(x)==FP_SUBNORMAL);
328 }
329
330 RUDIMENTS_INLINE bool math::isNaN(double x) {
331 return isnan(x);
332 }
333
334 RUDIMENTS_INLINE bool math::isInfinite(double x) {
335 return isinf(x);
336 }
337
338 RUDIMENTS_INLINE bool math::isGreater(double x, double y) {
339 return isgreater(x,y);
340 }
341
342 RUDIMENTS_INLINE bool math::isGreaterOrEqual(double x, double y) {
343 return isgreaterequal(x,y);
344 }
345
346 RUDIMENTS_INLINE bool math::isLess(double x, double y) {
347 return isless(x,y);
348 }
349
350 RUDIMENTS_INLINE bool math::isLessOrEqual(double x, double y) {
351 return islessequal(x,y);
352 }
353
354 RUDIMENTS_INLINE bool math::isLessOrGreater(double x, double y) {
355 return islessgreater(x,y);
356 }
357
358 RUDIMENTS_INLINE bool math::areNaN(double x, double y) {
359 return isunordered(x,y);
360 }
361
362 RUDIMENTS_INLINE bool math::isSignBitSet(double x) {
363 return signbit(x);
364 }
365
366 RUDIMENTS_INLINE double math::arcCosine(double x) {
367 return acos(x);
368 }
369
370 RUDIMENTS_INLINE double math::arcSine(double x) {
371 return asin(x);
372 }
373
374 RUDIMENTS_INLINE double math::arcTangent(double x) {
375 return atan(x);
376 }
377
378 RUDIMENTS_INLINE double math::arcTangent(double y, double x) {
379 return atan2(y,x);
380 }
381
382 RUDIMENTS_INLINE double math::cosine(double x) {
383 return cos(x);
384 }
385
386 RUDIMENTS_INLINE double math::sine(double x) {
387 return sin(x);
388 }
389
390 RUDIMENTS_INLINE double math::tangent(double x) {
391 return tan(x);
392 }
393
394 RUDIMENTS_INLINE double math::hyperbolicArcCosine(double x) {
395 return acosh(x);
396 }
397
398 RUDIMENTS_INLINE double math::hyperbolicArcSine(double x) {
399 return asinh(x);
400 }
401
402 RUDIMENTS_INLINE double math::hyperbolicArcTangent(double x) {
403 return atanh(x);
404 }
405
406 RUDIMENTS_INLINE double math::hyperbolicCosine(double x) {
407 return cosh(x);
408 }
409
410 RUDIMENTS_INLINE double math::hyperbolicSine(double x) {
411 return sinh(x);
412 }
413
414 RUDIMENTS_INLINE double math::hyperbolicTangent(double x) {
415 return tanh(x);
416 }
417
418 RUDIMENTS_INLINE double math::naturalExponent(double x) {
419 return exp(x);
420 }
421
422 RUDIMENTS_INLINE double math::normalize(double x, int32_t *exp) {
423 return frexp(x,exp);
424 }
425
426 RUDIMENTS_INLINE double math::naturalLog(double x) {
427 return log(x);
428 }
429
430 RUDIMENTS_INLINE double math::logBase10(double x) {
431 return log10(x);
432 }
433
434 RUDIMENTS_INLINE double math::naturalExponentMinusOne(double x) {
435 return expm1(x);
436 }
437
438 RUDIMENTS_INLINE double math::naturalLogPlusOne(double x) {
439 return log1p(x);
440 }
441
442 RUDIMENTS_INLINE double math::exponent(double x) {
443 return logb(x);
444 }
445
446 RUDIMENTS_INLINE double math::exponentBase2(double x) {
447 return exp2(x);
448 }
449
450 RUDIMENTS_INLINE double math::logBase2(double x) {
451 return log2(x);
452 }
453
454 RUDIMENTS_INLINE double math::power(double x, double y) {
455 return pow(x,y);
456 }
457
458 RUDIMENTS_INLINE double math::squareRoot(double x) {
459 return sqrt(x);
460 }
461
462 RUDIMENTS_INLINE double math::hypotenuse(double x, double y) {
463 return hypot(x,y);
464 }
465
466 RUDIMENTS_INLINE double math::cubeRoot(double x) {
467 return cbrt(x);
468 }
469
470 RUDIMENTS_INLINE double math::ceiling(double x) {
471 return ceil(x);
472 }
473
474 RUDIMENTS_INLINE double math::absoluteValue(double x) {
475 return fabs(x);
476 }
477
478 RUDIMENTS_INLINE double math::floor(double x) {
479 return floor(x);
480 }
481
482 RUDIMENTS_INLINE double math::remainder(double x, double y) {
483 return fmod(x,y);
484 }
485
486 RUDIMENTS_INLINE double math::nearbyInteger(double x) {
487 return nearbyint(x);
488 }
489
490 RUDIMENTS_INLINE double math::round(double x) {
491 return round(x);
492 }
493
494 RUDIMENTS_INLINE double math::truncate(double x) {
495 return trunc(x);
496 }
497
498 RUDIMENTS_INLINE double math::remainder(double x, double y, int32_t *quo) {
499 return remquo(x,y,quo);
500 }
501
502 RUDIMENTS_INLINE long math::roundToLong(double x) {
503 return lrint(x);
504 }
505
506 RUDIMENTS_INLINE int64_t math::roundToLongLong(double x) {
507 return llrint(x);
508 }
509
510 RUDIMENTS_INLINE long math::roundAwayFromZeroToLong(double x) {
511 return lround(x);
512 }
513
514 RUDIMENTS_INLINE int64_t math::roundAwayFromZeroToLongLong(double x) {
515 return llround(x);
516 }
517
518 RUDIMENTS_INLINE double math::copySignBit(double x, double y) {
519 return copysign(x,y);
520 }
521
522 RUDIMENTS_INLINE double math::errorFunction(double x) {
523 return erf(x);
524 }
525
526 RUDIMENTS_INLINE double math::complementaryErrorFunction(double x) {
527 return erfc(x);
528 }
529
530 RUDIMENTS_INLINE double math::trueGamma(double x) {
531 return tgamma(x);
532 }
533
534 RUDIMENTS_INLINE double math::naturalLogGamma(double x) {
535 return lgamma(x);
536 }
537
538 RUDIMENTS_INLINE double math::roundInexact(double x) {
539 return rint(x);
540 }
541
542 RUDIMENTS_INLINE double math::nextAfter(double x, double y) {
543 return nextafter(x,y);
544 }
545
546 RUDIMENTS_INLINE double math::nextToward(double x, double y) {
547 return nexttoward(x,y);
548 }
549
550 RUDIMENTS_INLINE double math::scaleByRadixToPower(double x, double n) {
551 return scalb(x,n);
552 }
553
554 RUDIMENTS_INLINE double math::scaleByRadixToPower(double x, int32_t n) {
555 return scalbn(x,n);
556 }
557
558 RUDIMENTS_INLINE double math::scaleByRadixToPower(double x, long n) {
559 return scalbln(x,n);
560 }
561
562 RUDIMENTS_INLINE int32_t math::integralExponent(double x) {
563 return ilogb(x);
564 }
565
566 RUDIMENTS_INLINE double math::positiveDifference(double x, double y) {
567 return fdim(x,y);
568 }
569
570 RUDIMENTS_INLINE double math::larger(double x, double y) {
571 return fmax(x,y);
572 }
573
574 RUDIMENTS_INLINE double math::smaller(double x, double y) {
575 return fmin(x,y);
576 }
577
578 RUDIMENTS_INLINE double math::multiplyAndAdd(double x, double y, double z) {
579 return fma(x,y,z);
580 }
581
582 RUDIMENTS_INLINE double math::argument(double complex z) {
583 return carg(z);
584 }
585
586 RUDIMENTS_INLINE double complex math::conjugate(double complex z) {
587 return conj(z);
588 }
589
590 RUDIMENTS_INLINE double complex math::project(double complex z) {
591 return cproj(z);
592 }
593
594 RUDIMENTS_INLINE double math::imaginary(double complex z) {
595 return cimag(z);
596 }
597
598 RUDIMENTS_INLINE double math::real(double complex z) {
599 return creal(z);
600 }
601
602
603 // long double methods
604
605 RUDIMENTS_INLINE bool math::isFinite(long double x) {
606 return isfinite(x);
607 }
608
609 RUDIMENTS_INLINE bool math::isNormal(long double x) {
610 return isnormal(x);
611 }
612
613 RUDIMENTS_INLINE bool math::isSubNormal(long double x) {
614 return (fpclassify(x)==FP_SUBNORMAL);
615 }
616
617 RUDIMENTS_INLINE bool math::isNaN(long double x) {
618 return isnan(x);
619 }
620
621 RUDIMENTS_INLINE bool math::isInfinite(long double x) {
622 return isinf(x);
623 }
624
625 RUDIMENTS_INLINE bool math::isGreater(long double x, long double y) {
626 return isgreater(x,y);
627 }
628
629 RUDIMENTS_INLINE bool math::isGreaterOrEqual(long double x, long double y) {
630 return isgreaterequal(x,y);
631 }
632
633 RUDIMENTS_INLINE bool math::isLess(long double x, long double y) {
634 return isless(x,y);
635 }
636
637 RUDIMENTS_INLINE bool math::isLessOrEqual(long double x, long double y) {
638 return islessequal(x,y);
639 }
640
641 RUDIMENTS_INLINE bool math::isLessOrGreater(long double x, long double y) {
642 return islessgreater(x,y);
643 }
644
645 RUDIMENTS_INLINE bool math::areNaN(long double x, long double y) {
646 return isunordered(x,y);
647 }
648
649 RUDIMENTS_INLINE bool math::isSignBitSet(long double x) {
650 return signbit(x);
651 }
652
653 RUDIMENTS_INLINE long double math::arcCosine(long double x) {
654 return acosl(x);
655 }
656
657 RUDIMENTS_INLINE long double math::arcSine(long double x) {
658 return asinl(x);
659 }
660
661 RUDIMENTS_INLINE long double math::arcTangent(long double x) {
662 return atanl(x);
663 }
664
665 RUDIMENTS_INLINE long double math::arcTangent(long double y, long double x) {
666 return atan2l(y,x);
667 }
668
669 RUDIMENTS_INLINE long double math::cosine(long double x) {
670 return cosl(x);
671 }
672
673 RUDIMENTS_INLINE long double math::sine(long double x) {
674 return sinl(x);
675 }
676
677 RUDIMENTS_INLINE long double math::tangent(long double x) {
678 return tanl(x);
679 }
680
681 RUDIMENTS_INLINE long double math::hyperbolicArcCosine(long double x) {
682 return acoshl(x);
683 }
684
685 RUDIMENTS_INLINE long double math::hyperbolicArcSine(long double x) {
686 return asinhl(x);
687 }
688
689 RUDIMENTS_INLINE long double math::hyperbolicArcTangent(long double x) {
690 return atanhl(x);
691 }
692
693 RUDIMENTS_INLINE long double math::hyperbolicCosine(long double x) {
694 return coshl(x);
695 }
696
697 RUDIMENTS_INLINE long double math::hyperbolicSine(long double x) {
698 return sinhl(x);
699 }
700
701 RUDIMENTS_INLINE long double math::hyperbolicTangent(long double x) {
702 return tanhl(x);
703 }
704
705 RUDIMENTS_INLINE long double math::naturalExponent(long double x) {
706 return expl(x);
707 }
708
709 RUDIMENTS_INLINE long double math::normalize(long double x, int32_t *exp) {
710 return frexpl(x,exp);
711 }
712
713 RUDIMENTS_INLINE long double math::naturalLog(long double x) {
714 return logl(x);
715 }
716
717 RUDIMENTS_INLINE long double math::logBase10(long double x) {
718 return log10l(x);
719 }
720
721 RUDIMENTS_INLINE long double math::naturalExponentMinusOne(long double x) {
722 return expm1l(x);
723 }
724
725 RUDIMENTS_INLINE long double math::naturalLogPlusOne(long double x) {
726 return log1pl(x);
727 }
728
729 RUDIMENTS_INLINE long double math::exponent(long double x) {
730 return logbl(x);
731 }
732
733 RUDIMENTS_INLINE long double math::exponentBase2(long double x) {
734 return exp2l(x);
735 }
736
737 RUDIMENTS_INLINE long double math::logBase2(long double x) {
738 return log2l(x);
739 }
740
741 RUDIMENTS_INLINE long double math::power(long double x, long double y) {
742 return powl(x,y);
743 }
744
745 RUDIMENTS_INLINE long double math::squareRoot(long double x) {
746 return sqrtl(x);
747 }
748
749 RUDIMENTS_INLINE long double math::hypotenuse(long double x, long double y) {
750 return hypotl(x,y);
751 }
752
753 RUDIMENTS_INLINE long double math::cubeRoot(long double x) {
754 return cbrtl(x);
755 }
756
757 RUDIMENTS_INLINE long double math::ceiling(long double x) {
758 return ceill(x);
759 }
760
761 RUDIMENTS_INLINE long double math::absoluteValue(long double x) {
762 return fabsl(x);
763 }
764
765 RUDIMENTS_INLINE long double math::floor(long double x) {
766 return floorl(x);
767 }
768
769 RUDIMENTS_INLINE long double math::remainder(long double x, long double y) {
770 return fmodl(x,y);
771 }
772
773 RUDIMENTS_INLINE long double math::nearbyInteger(long double x) {
774 return nearbyintl(x);
775 }
776
777 RUDIMENTS_INLINE long double math::round(long double x) {
778 return roundl(x);
779 }
780
781 RUDIMENTS_INLINE long double math::truncate(long double x) {
782 return truncl(x);
783 }
784
785 RUDIMENTS_INLINE long double math::remainder(long double x,
786 long double y, int32_t *quo) {
787 return remquol(x,y,quo);
788 }
789
790 RUDIMENTS_INLINE long math::roundToLong(long double x) {
791 return lrintl(x);
792 }
793
794 RUDIMENTS_INLINE int64_t math::roundToLongLong(long double x) {
795 return llrintl(x);
796 }
797
798 RUDIMENTS_INLINE long math::roundAwayFromZeroToLong(long double x) {
799 return lroundl(x);
800 }
801
802 RUDIMENTS_INLINE int64_t math::roundAwayFromZeroToLongLong(long double x) {
803 return llroundl(x);
804 }
805
806 RUDIMENTS_INLINE long double math::copySignBit(long double x, long double y) {
807 return copysignl(x,y);
808 }
809
810 RUDIMENTS_INLINE long double math::errorFunction(long double x) {
811 return erfl(x);
812 }
813
814 RUDIMENTS_INLINE long double math::complementaryErrorFunction(long double x) {
815 return erfcl(x);
816 }
817
818 RUDIMENTS_INLINE long double math::trueGamma(long double x) {
819 return tgammal(x);
820 }
821
822 RUDIMENTS_INLINE long double math::naturalLogGamma(long double x) {
823 return lgammal(x);
824 }
825
826 RUDIMENTS_INLINE long double math::roundInexact(long double x) {
827 return rintl(x);
828 }
829
830 RUDIMENTS_INLINE long double math::nextAfter(long double x, long double y) {
831 return nextafterl(x,y);
832 }
833
834 RUDIMENTS_INLINE long double math::nextToward(long double x, long double y) {
835 return nexttowardl(x,y);
836 }
837
838 RUDIMENTS_INLINE long double math::scaleByRadixToPower(long double x,
839 long double n) {
840 return scalbl(x,n);
841 }
842
843 RUDIMENTS_INLINE long double math::scaleByRadixToPower(long double x,
844 int32_t n) {
845 return scalbnl(x,n);
846 }
847
848 RUDIMENTS_INLINE long double math::scaleByRadixToPower(long double x, long n) {
849 return scalblnl(x,n);
850 }
851
852 RUDIMENTS_INLINE int32_t math::integralExponent(long double x) {
853 return ilogbl(x);
854 }
855
856 RUDIMENTS_INLINE long double math::positiveDifference(long double x,
857 long double y) {
858 return fdiml(x,y);
859 }
860
861 RUDIMENTS_INLINE long double math::larger(long double x, long double y) {
862 return fmaxl(x,y);
863 }
864
865 RUDIMENTS_INLINE long double math::smaller(long double x, long double y) {
866 return fminl(x,y);
867 }
868
869 RUDIMENTS_INLINE long double math::multiplyAndAdd(long double x,
870 long double y, long double z) {
871 return fmal(x,y,z);
872 }
873
874 RUDIMENTS_INLINE long double math::argument(long double complex z) {
875 return cargl(z);
876 }
877
878 RUDIMENTS_INLINE long double complex math::conjugate(long double complex z) {
879 return conjl(z);
880 }
881
882 RUDIMENTS_INLINE long double complex math::project(long double complex z) {
883 return cprojl(z);
884 }
885
886 RUDIMENTS_INLINE long double math::imaginary(long double complex z) {
887 return cimagl(z);
888 }
889
890 RUDIMENTS_INLINE long double math::real(long double complex z) {
891 return creall(z);
892 }
893
894 RUDIMENTS_INLINE float math::loadExponent(float x, int32_t exp) {
895 return ldexpf(x,exp);
896 }
897
898 RUDIMENTS_INLINE double math::loadExponent(double x, int32_t exp) {
899 return ldexp(x,exp);
900 }
901
902 RUDIMENTS_INLINE long double math::loadExponent(long double x, int32_t exp) {
903 return ldexpl(x,exp);
904 }