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