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 42 #define FP_SUBNORMAL 3 50 #define FP_ILOGB0 -2147483648 51 #define FP_ILOGBNAN -2147483648 56 #define MATH_ERREXCEPT 2 62 #define math_errhandling _math_errhandling 64 #if FLT_EVAL_METHOD == 0 75 #elif FLT_EVAL_METHOD == 1 86 #elif FLT_EVAL_METHOD == 2 119 #define isgreater(x,y) ((isnan(x) || isnan(y)) ? 0 : ( (x) > (y) ? 1 : 0 )) 128 #define isgreaterequal(x,y) ((isnan(x) || isnan(y)) ? 0 : ( (x) >= (y) ? 1 : 0 )) 137 #define isless(x,y) ((isnan(x) || isnan(y)) ? 0 : ( (x) < (y) ? 1 : 0 )) 146 #define islessequal(x,y) ((isnan(x) || isnan(y)) ? 0 : ( (x) <= (y) ? 1 : 0 )) 155 #define islessgreater(x,y) ((isnan(x) || isnan(y)) ? 0 : ( (x) < (y) || (x) > (y) ? 1 : 0 )) 164 #define isunordered(x,y) ((isnan(x) || isnan(y)) ? 1 : 0 )) 178 double cos(
double x);
194 long double cosl(
long double x);
202 double sin(
double x);
218 long double sinl(
long double x);
226 double tan(
double x);
242 long double tanl(
long double x);
250 double acos(
double x);
258 float acosf(
float x);
266 long double acosl(
long double x);
274 double asin(
double x);
282 float asinf(
float x);
290 long double asinl(
long double x);
298 double atan(
double x);
306 float atanf(
float x);
314 long double atanl(
long double x);
323 double atan2(
double x,
double y);
332 float atan2f(
float x,
float y);
341 long double atan2l(
long double x,
long double y);
351 double cosh(
double x);
359 float coshf(
float x);
367 long double coshl(
long double x);
375 double sinh(
double x);
383 float sinhf(
float x);
391 long double sinhl(
long double x);
399 double tanh(
double x);
407 float tanhf(
float x);
415 long double tanhl(
long double x);
423 double acosh(
double x);
439 long double acoshl(
long double x);
447 double asinh(
double x);
463 long double asinhl(
long double x);
471 double atanh(
double x);
487 long double atanhl(
long double x);
497 double exp(
double x);
513 long double expl(
long double x);
522 double frexp(
double x,
int* exp);
531 float frexpf(
float x,
int* exp);
540 long double frexpl(
long double x,
int* exp);
549 double ldexp(
double x,
int exp);
558 float ldexpf(
float x,
int exp);
567 long double ldexpl(
long double x,
int exp);
575 double log(
double x);
591 long double logl(
long double x);
599 double log10(
double x);
615 long double log10l(
long double x);
624 double modf(
double x,
double* iptr);
633 float modff(
float x,
float* iptr);
642 long double modfl(
long double x,
long double* iptr);
650 double exp2(
double x);
658 float exp2f(
float x);
666 long double exp2l(
long double x);
674 double expm1(
double x);
690 long double expm1l(
long double x);
714 int ilogbl(
long double x);
722 double log1p(
double x);
738 long double log1pl(
long double x);
746 double log2(
double x);
754 float log2f(
float x);
762 long double log2l(
long double x);
770 double logb(
double x);
778 float logbf(
float x);
786 long double logbl(
long double x);
795 double scalbn(
double x,
int n);
813 long double scalbnl(
long double x,
int n);
822 double scalbln(
double x,
long int n);
831 float scalblnf(
float x,
long int n);
840 long double scalblnl(
long double x,
long int n);
851 double pow(
double base,
double exponent);
860 float powf(
float base,
float exponent);
869 long double powl(
long double base,
long double exponent);
877 double sqrt(
double x);
885 float sqrtf(
float x);
893 long double sqrtl(
long double x);
901 double cbrt(
double x);
909 float cbrtf(
float x);
917 long double cbrtl(
long double x);
926 double hypot(
double x,
double y);
935 float hypotf(
float x,
float y);
944 long double hypotl(
long double x,
long double y);
954 double erf(
double x);
970 long double erfl(
long double x);
978 double erfc(
double x);
986 float erfcf(
float x);
994 long double erfcl(
long double x);
1018 long double tgammal(
long double x);
1042 long double lgammal(
long double x);
1052 double ceil(
double x);
1060 float ceilf(
float x);
1068 long double ceill(
long double x);
1076 double floor(
double x);
1092 long double floorl(
long double x);
1101 double fmod(
double numer,
double denom);
1110 float fmodf(
float numer,
float denom);
1119 long double fmodl(
long double numer,
long double denom);
1127 double trunc(
double x);
1143 long double truncl(
long double x);
1151 double round(
double x);
1167 long double roundl(
long double x);
1175 long int lround(
double x);
1191 long int lroundl(
long double x);
1199 long long int llround(
double x);
1215 long long int llroundl(
long double x);
1223 double rint(
double x);
1231 float rintf(
float x);
1239 long double rintl(
long double x);
1247 long int lrint(
double x);
1255 long int lrintf(
float x);
1263 long int lrintl(
long double x);
1271 long long int llrint(
double x);
1279 long long int llrintf(
float x);
1287 long long int llrintl(
long double x);
1338 long double remainderl(
long double x,
long double y);
1348 double remquo(
double numer,
double denom,
int* quot);
1358 float remquof(
float numer,
float denom,
int* quot);
1368 long double remquol(
long double numer,
long double denom,
int* quot);
1379 double copysign(
double x,
double y);
1397 long double copysignl(
long double x,
long double y);
1405 double nan(
const char* arg);
1413 float nanf(
const char* arg);
1421 long double nanl(
const char* arg);
1448 long double nextafterl(
long double x,
long double y);
1475 long double nexttowardl(
long double x,
long double y);
1486 double fdim(
double x,
double y);
1495 float fdimf(
float x,
float y);
1504 long double fdiml(
long double x,
long double y);
1513 double fmax(
double x,
double y);
1522 float fmaxf(
float x,
float y);
1531 long double fmaxl(
long double x,
long double y);
1540 double fmin(
double x,
double y);
1549 float fminf(
float x,
float y);
1558 long double fminl(
long double x,
long double y);
1568 double fabs(
double x);
1576 float fabsf(
float x);
1584 long double fabsl(
long double x);
1594 double fma(
double x,
double y,
double z);
1604 float fmaf(
float x,
float y,
float z);
1614 long double fmal(
long double x,
long double y,
long double z);
1644 unsigned char bytes[
sizeof(
long double)];
1732 #define fpclasify(x) (sizeof(x) == sizeof(double) ? __math_fpclasify(x) : (sizeof(x) == sizeof(float) ? __math_fpclasifyf(x) : __math_fpclasifyl(x))) 1740 #define isfinite(x) ((fpclasify(x) == FP_NORMAL || fpclasify(x) == FP_ZERO )) 1748 #define isinf(x) (fpclasify(x) == FP_INFINITE) 1756 #define isnan(x) (fpclasify(x) == FP_NAN) 1764 #define isnormal(x) (fpclasify(x) == FP_NORMAL) 1771 #define signbit(arg) (sizeof(arg) == sizeof(double) ? __math_signbit(arg) : (sizeof(arg) == sizeof(float) ? __math_signbitf(arg) : __math_signbitl(arg))) 1781 #define FP_FAST_FMA(x, y, z) (fma(x, y, z)) 1791 #define FP_FAST_FMAF(x, y, z) (fmaf(x, y, z)) 1801 #define FP_FAST_FMAL(x, y, z) (fmal(x, y, z)) 1807 #define NAN (__math_NANf()) 1813 #define INFINITY (__math_INFf()) 1819 #define HUGE_VAL (__math_INF()) 1825 #define HUGE_VALF (__math_INFf()) 1831 #define HUGE_VALL (__math_INFl()) 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