MicrOS
math.h
Go to the documentation of this file.
1 #include <limits.h>
2 #include <float.h>
3 #include "errno.h"
4 #include "fenv.h"
5 
6 #ifndef MATH_H
7 #define MATH_H
8 
10 #define M_E 2.7182818284590452354
11 #define M_LOG2E 1.4426950408889634074
13 #define M_LOG10E 0.43429448190325182765
15 #define M_LN2 0.69314718055994530942
17 #define M_LN10 2.30258509299404568402
19 #define M_PI 3.14159265358979323846
21 #define M_PI_2 1.57079632679489661923
23 #define M_PI_4 0.78539816339744830962
25 #define M_1_PI 0.31830988618379067154
27 #define M_2_PI 0.63661977236758134308
29 #define M_2_SQRTPI 1.12837916709551257390
31 #define M_SQRT2 1.41421356237309504880
33 #define M_SQRT1_2 0.70710678118654752440
35 
37 #define FP_INFINITE 0
38 #define FP_NAN 1
40 #define FP_ZERO 2
42 #define FP_SUBNORMAL 3
44 #define FP_NORMAL 4
46 #define FP_WTF 5
48 
50 #define FP_ILOGB0 -2147483648
51 #define FP_ILOGBNAN -2147483648
53 
55 #define MATH_ERRNO 1
56 #define MATH_ERREXCEPT 2
58 extern int _math_errhandling;
61 
62 #define math_errhandling _math_errhandling
63 
64 #if FLT_EVAL_METHOD == 0
65 
69  typedef float float_t;
71 
74  typedef double double_t;
75 #elif FLT_EVAL_METHOD == 1
76 
80  typedef double float_t;
82 
85  typedef double double_t;
86 #elif FLT_EVAL_METHOD == 2
87 
91  typedef long double float_t;
93 
96  typedef long double double_t;
97 #else
98 
102  typedef float float_t;
104 
107  typedef double double_t;
108 #endif
109 
110 // Comparison macro
111 
113 
119 #define isgreater(x,y) ((isnan(x) || isnan(y)) ? 0 : ( (x) > (y) ? 1 : 0 ))
120 
122 
128 #define isgreaterequal(x,y) ((isnan(x) || isnan(y)) ? 0 : ( (x) >= (y) ? 1 : 0 ))
129 
131 
137 #define isless(x,y) ((isnan(x) || isnan(y)) ? 0 : ( (x) < (y) ? 1 : 0 ))
138 
140 
146 #define islessequal(x,y) ((isnan(x) || isnan(y)) ? 0 : ( (x) <= (y) ? 1 : 0 ))
147 
149 
155 #define islessgreater(x,y) ((isnan(x) || isnan(y)) ? 0 : ( (x) < (y) || (x) > (y) ? 1 : 0 ))
156 
158 
164 #define isunordered(x,y) ((isnan(x) || isnan(y)) ? 1 : 0 ))
165 
166 #ifdef __cplusplus
167 extern "C" {
168 #endif
169 
170 // Trigonometric functions
171 
173 
178 double cos(double x);
179 
181 
186 float cosf(float x);
187 
189 
194 long double cosl(long double x);
195 
197 
202 double sin(double x);
203 
205 
210 float sinf(float x);
211 
213 
218 long double sinl(long double x);
219 
221 
226 double tan(double x);
227 
229 
234 float tanf(float x);
235 
237 
242 long double tanl(long double x);
243 
245 
250 double acos(double x);
251 
253 
258 float acosf(float x);
259 
261 
266 long double acosl(long double x);
267 
269 
274 double asin(double x);
275 
277 
282 float asinf(float x);
283 
285 
290 long double asinl(long double x);
291 
293 
298 double atan(double x);
299 
301 
306 float atanf(float x);
307 
309 
314 long double atanl(long double x);
315 
317 
323 double atan2(double x, double y);
324 
326 
332 float atan2f(float x, float y);
333 
335 
341 long double atan2l(long double x, long double y);
342 
343 // Hyperbolic functions
344 
346 
351 double cosh(double x);
352 
354 
359 float coshf(float x);
360 
362 
367 long double coshl(long double x);
368 
370 
375 double sinh(double x);
376 
378 
383 float sinhf(float x);
384 
386 
391 long double sinhl(long double x);
392 
394 
399 double tanh(double x);
400 
402 
407 float tanhf(float x);
408 
410 
415 long double tanhl(long double x);
416 
418 
423 double acosh(double x);
424 
426 
431 float acoshf(float x);
432 
434 
439 long double acoshl(long double x);
440 
442 
447 double asinh(double x);
448 
450 
455 float asinhf(float x);
456 
458 
463 long double asinhl(long double x);
464 
466 
471 double atanh(double x);
472 
474 
479 float atanhf(float x);
480 
482 
487 long double atanhl(long double x);
488 
489 // Exponential and logarithmic functions
490 
492 
497 double exp(double x);
498 
500 
505 float expf(float x);
506 
508 
513 long double expl(long double x);
514 
516 
522 double frexp(double x, int* exp);
523 
525 
531 float frexpf(float x, int* exp);
532 
534 
540 long double frexpl(long double x, int* exp);
541 
543 
549 double ldexp(double x, int exp);
550 
552 
558 float ldexpf(float x, int exp);
559 
561 
567 long double ldexpl(long double x, int exp);
568 
570 
575 double log(double x);
576 
578 
583 float logf(float x);
584 
586 
591 long double logl(long double x);
592 
594 
599 double log10(double x);
600 
602 
607 float log10f(float x);
608 
610 
615 long double log10l(long double x);
616 
618 
624 double modf(double x, double* iptr);
625 
627 
633 float modff(float x, float* iptr);
634 
636 
642 long double modfl(long double x, long double* iptr);
643 
645 
650 double exp2(double x);
651 
653 
658 float exp2f(float x);
659 
661 
666 long double exp2l(long double x);
667 
669 
674 double expm1(double x);
675 
677 
682 float expm1f(float x);
683 
685 
690 long double expm1l(long double x);
691 
693 
698 int ilogb(double x);
699 
701 
706 int ilogbf(float x);
707 
709 
714 int ilogbl(long double x);
715 
717 
722 double log1p(double x);
723 
725 
730 float log1pf(float x);
731 
733 
738 long double log1pl(long double x);
739 
741 
746 double log2(double x);
747 
749 
754 float log2f(float x);
755 
757 
762 long double log2l(long double x);
763 
765 
770 double logb(double x);
771 
773 
778 float logbf(float x);
779 
781 
786 long double logbl(long double x);
787 
789 
795 double scalbn(double x, int n);
796 
798 
804 float scalbnf(float x, int n);
805 
807 
813 long double scalbnl(long double x, int n);
814 
816 
822 double scalbln(double x, long int n);
823 
825 
831 float scalblnf(float x, long int n);
832 
834 
840 long double scalblnl(long double x, long int n);
841 
842 // Power functions
843 
845 
851 double pow(double base, double exponent);
852 
854 
860 float powf(float base, float exponent);
861 
863 
869 long double powl(long double base, long double exponent);
870 
872 
877 double sqrt(double x);
878 
880 
885 float sqrtf(float x);
886 
888 
893 long double sqrtl(long double x);
894 
896 
901 double cbrt(double x);
902 
904 
909 float cbrtf(float x);
910 
912 
917 long double cbrtl(long double x);
918 
920 
926 double hypot(double x, double y);
927 
929 
935 float hypotf(float x, float y);
936 
938 
944 long double hypotl(long double x, long double y);
945 
946 // Error and gamma functions
947 
949 
954 double erf(double x);
955 
957 
962 float erff(float x);
963 
965 
970 long double erfl(long double x);
971 
973 
978 double erfc(double x);
979 
981 
986 float erfcf(float x);
987 
989 
994 long double erfcl(long double x);
995 
997 
1002 double tgamma(double x);
1003 
1005 
1010 float tgammaf(float x);
1011 
1013 
1018 long double tgammal(long double x);
1019 
1021 
1026 double lgamma(double x);
1027 
1029 
1034 float lgammaf(float x);
1035 
1037 
1042 long double lgammal(long double x);
1043 
1044 // Nearest integer floating-point operations
1045 
1047 
1052 double ceil(double x);
1053 
1055 
1060 float ceilf(float x);
1061 
1063 
1068 long double ceill(long double x);
1069 
1071 
1076 double floor(double x);
1077 
1079 
1084 float floorf(float x);
1085 
1087 
1092 long double floorl(long double x);
1093 
1095 
1101 double fmod(double numer, double denom);
1102 
1104 
1110 float fmodf(float numer, float denom);
1111 
1113 
1119 long double fmodl(long double numer, long double denom);
1120 
1122 
1127 double trunc(double x);
1128 
1130 
1135 float truncf(float x);
1136 
1138 
1143 long double truncl(long double x);
1144 
1146 
1151 double round(double x);
1152 
1154 
1159 float roundf(float x);
1160 
1162 
1167 long double roundl(long double x);
1168 
1170 
1175 long int lround(double x);
1176 
1178 
1183 long int lroundf(float x);
1184 
1186 
1191 long int lroundl(long double x);
1192 
1194 
1199 long long int llround(double x);
1200 
1202 
1207 long long int llroundf(float x);
1208 
1210 
1215 long long int llroundl(long double x);
1216 
1218 
1223 double rint(double x);
1224 
1226 
1231 float rintf(float x);
1232 
1234 
1239 long double rintl(long double x);
1240 
1242 
1247 long int lrint(double x);
1248 
1250 
1255 long int lrintf(float x);
1256 
1258 
1263 long int lrintl(long double x);
1264 
1266 
1271 long long int llrint(double x);
1272 
1274 
1279 long long int llrintf(float x);
1280 
1282 
1287 long long int llrintl(long double x);
1288 
1290 
1295 double nearbyint(double x);
1296 
1298 
1303 float nearbyintf(float x);
1304 
1306 
1311 long double nearbyintl(long double x);
1312 
1314 
1320 double remainder(double x, double y);
1321 
1323 
1329 float remainderf(float x, float y);
1330 
1332 
1338 long double remainderl(long double x, long double y);
1339 
1341 
1348 double remquo(double numer, double denom, int* quot);
1349 
1351 
1358 float remquof(float numer, float denom, int* quot);
1359 
1361 
1368 long double remquol(long double numer, long double denom, int* quot);
1369 
1370 // Floating-point manipulation functions
1371 
1373 
1379 double copysign(double x, double y);
1380 
1382 
1388 float copysignf(float x, float y);
1389 
1391 
1397 long double copysignl(long double x, long double y);
1398 
1400 
1405 double nan(const char* arg);
1406 
1408 
1413 float nanf(const char* arg);
1414 
1416 
1421 long double nanl(const char* arg);
1422 
1424 
1430 double nextafter(double x, double y);
1431 
1433 
1439 float nextafterf(float x, float y);
1440 
1442 
1448 long double nextafterl(long double x, long double y);
1449 
1451 
1457 double nexttoward(double x, long double y);
1458 
1460 
1466 float nexttowardf(float x, long double y);
1467 
1469 
1475 long double nexttowardl(long double x, long double y);
1476 
1477 // Minimum, maximum, difference functions
1478 
1480 
1486 double fdim(double x, double y);
1487 
1489 
1495 float fdimf(float x, float y);
1496 
1498 
1504 long double fdiml(long double x, long double y);
1505 
1507 
1513 double fmax(double x, double y);
1514 
1516 
1522 float fmaxf(float x, float y);
1523 
1525 
1531 long double fmaxl(long double x, long double y);
1532 
1534 
1540 double fmin(double x, double y);
1541 
1543 
1549 float fminf(float x, float y);
1550 
1552 
1558 long double fminl(long double x, long double y);
1559 
1560 // Other functions
1561 
1563 
1568 double fabs(double x);
1569 
1571 
1576 float fabsf(float x);
1577 
1579 
1584 long double fabsl(long double x);
1585 
1587 
1594 double fma(double x, double y, double z);
1595 
1597 
1604 float fmaf(float x, float y, float z);
1605 
1607 
1614 long double fmal(long double x, long double y, long double z);
1615 
1616 #ifdef __cplusplus
1617 }
1618 #endif
1619 
1621 typedef union float_byte
1622 {
1624  float f;
1626  unsigned char bytes[sizeof(float)];
1627 } float_byte;
1628 
1630 typedef union double_byte
1631 {
1633  double f;
1635  unsigned char bytes[sizeof(double)];
1636 } double_byte;
1637 
1639 typedef union long_double_byte
1640 {
1642  long double f;
1644  unsigned char bytes[sizeof(long double)];
1646 
1647 #ifdef __cplusplus
1648 extern "C" {
1649 #endif
1650 
1651 // Additional content
1652 
1654 
1659 int __math_fpclasify(double x);
1660 
1662 
1667 int __math_fpclasifyf(float x);
1668 
1670 
1675 int __math_fpclasifyl(long double x);
1676 
1678 
1682 int __math_signbit(double x);
1683 
1685 
1689 int __math_signbitf(float x);
1690 
1692 
1696 int __math_signbitl(long double x);
1697 
1699 
1702 float __math_NANf();
1703 
1705 
1708 double __math_INF();
1709 
1711 
1714 float __math_INFf();
1715 
1717 
1720 long double __math_INFl();
1721 
1722 #ifdef __cplusplus
1723 }
1724 #endif
1725 
1727 
1732 #define fpclasify(x) (sizeof(x) == sizeof(double) ? __math_fpclasify(x) : (sizeof(x) == sizeof(float) ? __math_fpclasifyf(x) : __math_fpclasifyl(x)))
1733 
1735 
1740 #define isfinite(x) ((fpclasify(x) == FP_NORMAL || fpclasify(x) == FP_ZERO ))
1741 
1743 
1748 #define isinf(x) (fpclasify(x) == FP_INFINITE)
1749 
1751 
1756 #define isnan(x) (fpclasify(x) == FP_NAN)
1757 
1759 
1764 #define isnormal(x) (fpclasify(x) == FP_NORMAL)
1765 
1767 
1771 #define signbit(arg) (sizeof(arg) == sizeof(double) ? __math_signbit(arg) : (sizeof(arg) == sizeof(float) ? __math_signbitf(arg) : __math_signbitl(arg)))
1772 
1774 
1781 #define FP_FAST_FMA(x, y, z) (fma(x, y, z))
1782 
1784 
1791 #define FP_FAST_FMAF(x, y, z) (fmaf(x, y, z))
1792 
1794 
1801 #define FP_FAST_FMAL(x, y, z) (fmal(x, y, z))
1802 
1804 
1807 #define NAN (__math_NANf())
1808 
1810 
1813 #define INFINITY (__math_INFf())
1814 
1816 
1819 #define HUGE_VAL (__math_INF())
1820 
1822 
1825 #define HUGE_VALF (__math_INFf())
1826 
1828 
1831 #define HUGE_VALL (__math_INFl())
1832 
1833 #endif //MATH_H
long double expl(long double x)
Compute exponential function.
Definition: expl.c:3
float hypotf(float x, float y)
Compute hypotenuse.
Definition: hypotf.c:3
float logbf(float x)
Compute logarithm using FLT_RADIX.
Definition: logbf.c:3
long double ldexpl(long double x, int exp)
Generate value from significand and exponent.
Definition: ldexpl.c:3
long double nearbyintl(long double x)
Round to nearby integral value.
Definition: nearbyintl.c:3
long long int llrintl(long double x)
Round and cast to long long integer.
Definition: llrintl.c:3
float frexpf(float x, int *exp)
Get significand and exponent.
Definition: frexpf.c:3
unsigned char bytes[sizeof(float)]
Array of bytes.
Definition: math.h:1626
long double fmaxl(long double x, long double y)
Higher value.
Definition: fmaxl.c:3
float scalblnf(float x, long int n)
Scale significand using floating-point base exponent.
Definition: scalblnf.c:3
double modf(double x, double *iptr)
Break into fractional and integral parts.
Definition: modf.c:3
float atanf(float x)
Compute arc tangent.
Definition: atanf.c:3
int __math_signbitf(float x)
The signbit determines whether the sign of its argument value is negative.
Definition: __math_signbitf.c:3
double fma(double x, double y, double z)
Multiply-add.
Definition: fma.c:3
float truncf(float x)
Truncate value.
Definition: truncf.c:3
double exp(double x)
Compute exponential function.
Definition: exp.c:3
float sinf(float x)
Compute cosine.
Definition: sinf.c:3
float f
Float value.
Definition: math.h:1624
int ilogbf(float x)
Integer binary logarithm.
Definition: ilogbf.c:3
double acosh(double x)
Compute area hyperbolic cosine.
Definition: acosh.c:3
float nexttowardf(float x, long double y)
Next representable value toward precise value.
Definition: nexttowardf.c:3
long double lgammal(long double x)
Compute gamma function.
Definition: lgammal.c:3
float cbrtf(float x)
Compute cubic root.
Definition: cbrtf.c:3
double remquo(double numer, double denom, int *quot)
Compute remainder and quotient.
Definition: remquo.c:3
long double scalblnl(long double x, long int n)
Scale significand using floating-point base exponent.
Definition: scalblnl.c:3
long double rintl(long double x)
Round to integral value.
Definition: rintl.c:3
float sqrtf(float x)
Compute square root.
Definition: sqrtf.c:3
long double atanl(long double x)
Compute arc tangent.
Definition: atanl.c:3
long double logbl(long double x)
Compute logarithm using FLT_RADIX.
Definition: logbl.c:3
int __math_signbit(double x)
The signbit determines whether the sign of its argument value is negative.
Definition: __math_signbit.c:3
float fabsf(float x)
Compute absolute value.
Definition: fabsf.c:3
long double atan2l(long double x, long double y)
Compute arc tangent with two parameters.
Definition: atan2l.c:3
Type represent double value as array of bytes.
Definition: math.h:1630
float ldexpf(float x, int exp)
Generate value from significand and exponent.
Definition: ldexpf.c:3
long double log2l(long double x)
Compute 2 based logarithm.
Definition: log2l.c:3
double log1p(double x)
Compute natural logarithm of value + 1.
Definition: log1p.c:3
long double sqrtl(long double x)
Compute square root.
Definition: sqrtl.c:3
float sinhf(float x)
Compute hyperbolic sine.
Definition: sinhf.c:3
double acos(double x)
Compute arc cosine.
Definition: acos.c:3
float fdimf(float x, float y)
Positive difference.
Definition: fdimf.c:3
float tanhf(float x)
Compute hyperbolic tangent.
Definition: tanhf.c:3
long double nexttowardl(long double x, long double y)
Next representable value toward precise value.
Definition: nexttowardl.c:3
long double fabsl(long double x)
Compute absolute value.
Definition: fabsl.c:3
double fmod(double numer, double denom)
Compute remainder of division.
Definition: fmod.c:3
int _math_errhandling
Expands to an expression of type int that is either equal to MATH_ERRNO, or equal to MATH_ERREXCEPT...
Definition: math.c:3
float fmaf(float x, float y, float z)
Multiply-add.
Definition: fmaf.c:3
double rint(double x)
Round to integral value.
Definition: rint.c:3
double pow(double base, double exponent)
Compute power.
Definition: pow.c:3
long double tanhl(long double x)
Compute hyperbolic tangent.
Definition: tanhl.c:3
long double tgammal(long double x)
Compute gamma function.
Definition: tgammal.c:3
float __math_INFf()
Returns infinity.
Definition: __math_INFf.c:3
float atan2f(float x, float y)
Compute arc tangent with two parameters.
Definition: atan2f.c:3
double cbrt(double x)
Compute cubic root.
Definition: cbrt.c:3
double hypot(double x, double y)
Compute hypotenuse.
Definition: hypot.c:3
long int lroundf(float x)
Round to nearest and cast to long integer.
Definition: lroundf.c:3
long double coshl(long double x)
Compute hyperbolic cosine.
Definition: coshl.c:3
long double floorl(long double x)
Round down value.
Definition: floorl.c:3
float atanhf(float x)
Compute area hyperbolic tangent.
Definition: atanhf.c:3
float lgammaf(float x)
Compute gamma function.
double sinh(double x)
Compute hyperbolic sine.
Definition: sinh.c:3
double trunc(double x)
Truncate value.
Definition: trunc.c:3
Type represent float value as array of bytes.
Definition: math.h:1621
double f
Double value.
Definition: math.h:1633
double round(double x)
Round to nearest.
Definition: round.c:3
long double fminl(long double x, long double y)
Lower value.
Definition: fminl.c:3
float modff(float x, float *iptr)
Break into fractional and integral parts.
Definition: modff.c:3
long double sinhl(long double x)
Compute hyperbolic sine.
Definition: sinhl.c:3
double expm1(double x)
Compute exponential function minus 1.
Definition: expm1.c:3
int __math_fpclasifyf(float x)
Classify floating-point value.
Definition: __math_fpclasifyf.c:3
double log2(double x)
Compute 2 based logarithm.
Definition: log2.c:3
double fabs(double x)
Compute absolute value.
Definition: fabs.c:3
double scalbln(double x, long int n)
Scale significand using floating-point base exponent.
Definition: scalbln.c:3
float fmodf(float numer, float denom)
Compute remainder of division.
Definition: fmodf.c:3
int ilogb(double x)
Integer binary logarithm.
Definition: ilogb.c:3
double log10(double x)
Compute 10 based logarithm.
Definition: log10.c:3
double copysign(double x, double y)
Copy sign.
Definition: copysign.c:3
long long int llroundf(float x)
Round to nearest and cast to long long integer.
Definition: llroundf.c:3
long double log1pl(long double x)
Compute natural logarithm of value + 1.
Definition: log1pl.c:3
long double acosl(long double x)
Compute arc cosine.
Definition: acosl.c:3
float tanf(float x)
Compute tangent.
Definition: tanf.c:3
float asinf(float x)
Compute arc sine.
Definition: asinf.c:3
float nanf(const char *arg)
Generate quiet NaN.
Definition: nanf.c:3
double ceil(double x)
Round up value.
Definition: ceil.c:3
float fmaxf(float x, float y)
Higher value.
Definition: fmaxf.c:3
long double roundl(long double x)
Round to nearest.
Definition: roundl.c:3
int ilogbl(long double x)
Integer binary logarithm.
Definition: ilogbl.c:3
double exp2(double x)
Compute exponential function 2 based.
Definition: exp2.c:3
long double remainderl(long double x, long double y)
Compute reminder required by IEC 60559.
double double_t
Floating-point type.
Definition: math.h:74
long double copysignl(long double x, long double y)
Copy sign.
Definition: copysignl.c:3
float expm1f(float x)
Compute exponential function minus 1.
Definition: expm1f.c:3
long int lrint(double x)
Round and cast to long integer.
Definition: lrint.c:3
double nextafter(double x, double y)
Next representable value.
Definition: nextafter.c:3
long double fdiml(long double x, long double y)
Positive difference.
Definition: fdiml.c:3
float float_t
Floating-point type.
Definition: math.h:69
double sqrt(double x)
Compute square root.
Definition: sqrt.c:3
long int lrintf(float x)
Round and cast to long integer.
Definition: lrintf.c:3
double erfc(double x)
Compute complementary error function.
Definition: erfc.c:3
long long int llround(double x)
Round to nearest and cast to long long integer.
Definition: llround.c:3
double fmax(double x, double y)
Higher value.
Definition: fmax.c:3
float log1pf(float x)
Compute natural logarithm of value + 1.
Definition: log1pf.c:3
float logf(float x)
Compute natural logarithm.
Definition: logf.c:3
long double powl(long double base, long double exponent)
Compute power.
Definition: powl.c:3
double lgamma(double x)
Compute gamma function.
Definition: lgamma.c:3
double nexttoward(double x, long double y)
Next representable value toward precise value.
Definition: nexttoward.c:3
long double truncl(long double x)
Truncate value.
Definition: truncl.c:3
double remainder(double x, double y)
Compute reminder required by IEC 60559.
Definition: remainder.c:3
double ldexp(double x, int exp)
Generate value from significand and exponent.
Definition: ldexp.c:3
long double cosl(long double x)
Compute cosine.
Definition: cosl.c:3
long double nanl(const char *arg)
Generate quiet NaN.
Definition: nanl.c:3
long double asinhl(long double x)
Compute area hyperbolic sine.
Definition: asinhl.c:3
long double nextafterl(long double x, long double y)
Next representable value.
Definition: nexafterl.c:3
long double erfl(long double x)
Compute error function.
Definition: erfl.c:3
float nextafterf(float x, float y)
Next representable value.
Definition: nextafterf.c:3
long double frexpl(long double x, int *exp)
Get significand and exponent.
Definition: frexpl.c:3
float copysignf(float x, float y)
Copy sign.
Definition: copysignf.c:3
long double ceill(long double x)
Round up value.
Definition: ceill.c:3
long long int llroundl(long double x)
Round to nearest and cast to long long integer.
Definition: llroundl.c:3
long double log10l(long double x)
Compute 10 based logarithm.
Definition: log10l.c:3
float remquof(float numer, float denom, int *quot)
Compute remainder and quotient.
Definition: remquof.c:3
float roundf(float x)
Round to nearest.
Definition: roundf.c:3
long double fmodl(long double numer, long double denom)
Compute remainder of division.
Definition: fmodl.c:3
long double asinl(long double x)
Compute arc sine.
Definition: asinl.c:3
long double cbrtl(long double x)
Compute cubic root.
Definition: cbrtl.c:3
long double modfl(long double x, long double *iptr)
Break into fractional and integral parts.
Definition: modfl.c:3
float remainderf(float x, float y)
Compute reminder required by IEC 60559.
Definition: remainderf.c:3
double nearbyint(double x)
Round to nearby integral value.
Definition: nearbyint.c:3
long int lroundl(long double x)
Round to nearest and cast to long integer.
Definition: lroundl.c:3
long double expm1l(long double x)
Compute exponential function minus 1.
Definition: expm1l.c:3
float acosf(float x)
Compute arc cosine.
Definition: acosf.c:3
double scalbn(double x, int n)
Scale significand using floating-point base exponent.
Definition: scalbn.c:3
double atanh(double x)
Compute area hyperbolic tangent.
Definition: atanh.c:3
double tanh(double x)
Compute hyperbolic tangent.
Definition: tanh.c:3
float rintf(float x)
Round to integral value.
Definition: rintf.c:3
float floorf(float x)
Round down value.
Definition: floorf.c:3
Type represent long double value as array of bytes.
Definition: math.h:1639
int __math_fpclasify(double x)
Classify floating-point value.
Definition: __math_fpclasify.c:3
long double acoshl(long double x)
Compute area hyperbolic cosine.
Definition: acoshl.c:3
float log10f(float x)
Compute 10 based logarithm.
Definition: log10f.c:3
double cos(double x)
Compute cosine.
Definition: cos.c:3
long double scalbnl(long double x, int n)
Scale significand using floating-point base exponent.
Definition: scalbnl.c:3
float erfcf(float x)
Compute complementary error function.
Definition: erfcf.c:3
double atan(double x)
Compute arc tangent.
Definition: atan.c:3
float fminf(float x, float y)
Lower value.
Definition: fminf.c:3
double __math_INF()
Returns infinity.
Definition: __math_INF.c:3
int __math_signbitl(long double x)
The signbit determines whether the sign of its argument value is negative.
Definition: __math_signbitl.c:3
long double f
Long double value.
Definition: math.h:1642
float scalbnf(float x, int n)
Scale significand using floating-point base exponent.
Definition: scalbnf.c:3
double fmin(double x, double y)
Lower value.
Definition: fmin.c:3
float nearbyintf(float x)
Round to nearby integral value.
Definition: nearbyintf.c:3
float tgammaf(float x)
Compute gamma function.
Definition: lgammaf.c:3
double fdim(double x, double y)
Positive difference.
Definition: fdim.c:3
float erff(float x)
Compute error function.
Definition: erff.c:3
double asinh(double x)
Compute area hyperbolic sine.
Definition: asinh.c:3
double sin(double x)
Compute cosine.
Definition: sin.c:3
double floor(double x)
Round down value.
Definition: floor.c:3
double log(double x)
Compute natural logarithm.
Definition: log.c:3
float acoshf(float x)
Compute area hyperbolic cosine.
Definition: acoshf.c:3
long double sinl(long double x)
Compute cosine.
Definition: sinl.c:3
double cosh(double x)
Compute hyperbolic cosine.
Definition: cosh.c:3
double tgamma(double x)
Compute gamma function.
Definition: tgamma.c:3
long double hypotl(long double x, long double y)
Compute hypotenuse.
Definition: hypotl.c:3
double tan(double x)
Compute tangent.
Definition: tan.c:3
float cosf(float x)
Compute cosine.
Definition: cosf.c:3
double logb(double x)
Compute logarithm using FLT_RADIX.
Definition: logb.c:3
double erf(double x)
Compute error function.
Definition: erf.c:3
long double atanhl(long double x)
Compute area hyperbolic tangent.
Definition: atanhl.c:3
long double logl(long double x)
Compute natural logarithm.
Definition: logl.c:3
float log2f(float x)
Compute 2 based logarithm.
Definition: log2f.c:3
float expf(float x)
Compute exponential function.
Definition: expf.c:3
long double erfcl(long double x)
Compute complementary error function.
Definition: erfcl.c:3
float powf(float base, float exponent)
Compute power.
Definition: powf.c:3
long double exp2l(long double x)
Compute exponential function 2 based.
Definition: exp2l.c:3
long double fmal(long double x, long double y, long double z)
Multiply-add.
Definition: fmal.c:3
float ceilf(float x)
Round up value.
Definition: ceilf.c:3
float __math_NANf()
Returns quiet NAN.
Definition: __math_NANf.c:3
long long int llrintf(float x)
Round and cast to long long integer.
Definition: llrintf.c:3
int __math_fpclasifyl(long double x)
Classify floating-point value.
Definition: __math_fpclasifyl.c:3
long double __math_INFl()
Returns infinity.
Definition: __math_INFl.c:3
long double tanl(long double x)
Compute tangent.
Definition: tanl.c:3
long long int llrint(double x)
Round and cast to long long integer.
Definition: llrint.c:3
double frexp(double x, int *exp)
Get significand and exponent.
Definition: frexp.c:3
long int lround(double x)
Round to nearest and cast to long integer.
Definition: lround.c:3
long int lrintl(long double x)
Round and cast to long integer.
Definition: lrintl.c:3
float coshf(float x)
Compute hyperbolic cosine.
Definition: coshf.c:3
double nan(const char *arg)
Generate quiet NaN.
Definition: nan.c:3
float asinhf(float x)
Compute area hyperbolic sine.
Definition: asinhf.c:3
double atan2(double x, double y)
Compute arc tangent with two parameters.
Definition: atan2.c:3
float exp2f(float x)
Compute exponential function 2 based.
Definition: exp2f.c:3
long double remquol(long double numer, long double denom, int *quot)
Compute remainder and quotient.
Definition: remquol.c:3
double asin(double x)
Compute arc sine.
Definition: asin.c:3