MicrOS
|
Go to the source code of this file.
Classes | |
union | float_byte |
Type represent float value as array of bytes. More... | |
union | double_byte |
Type represent double value as array of bytes. More... | |
union | long_double_byte |
Type represent long double value as array of bytes. More... | |
Macros | |
#define | M_E 2.7182818284590452354 |
The base of natural logarithms. More... | |
#define | M_LOG2E 1.4426950408889634074 |
The logarithm to base 2 of M_E. More... | |
#define | M_LOG10E 0.43429448190325182765 |
The logarithm to base 10 of M_E. More... | |
#define | M_LN2 0.69314718055994530942 |
The natural logarithm of 2. More... | |
#define | M_LN10 2.30258509299404568402 |
The natural logarithm of 10. More... | |
#define | M_PI 3.14159265358979323846 |
Pi, the ratio of a circle’s circumference to its diameter. More... | |
#define | M_PI_2 1.57079632679489661923 |
Pi divided by two. More... | |
#define | M_PI_4 0.78539816339744830962 |
Pi divided by four. More... | |
#define | M_1_PI 0.31830988618379067154 |
The reciprocal of pi (1/pi). More... | |
#define | M_2_PI 0.63661977236758134308 |
Two times the reciprocal of pi. More... | |
#define | M_2_SQRTPI 1.12837916709551257390 |
Two times the reciprocal of the square root of pi. More... | |
#define | M_SQRT2 1.41421356237309504880 |
The square root of two. More... | |
#define | M_SQRT1_2 0.70710678118654752440 |
The reciprocal of the square root of two (also the square root of 1/2). More... | |
#define | FP_INFINITE 0 |
Positive or negative infinity (overflow). More... | |
#define | FP_NAN 1 |
Not-A-Number. More... | |
#define | FP_ZERO 2 |
Value of zero. More... | |
#define | FP_SUBNORMAL 3 |
Sub-normal value (underflow) More... | |
#define | FP_NORMAL 4 |
Normal value (none of the above). More... | |
#define | FP_WTF 5 |
In normal case this shouldn't be returned. More... | |
#define | FP_ILOGB0 -2147483648 |
Arg of ilogb is zero. More... | |
#define | FP_ILOGBNAN -2147483648 |
Arg of ilogb is NaN. More... | |
#define | MATH_ERRNO 1 |
Indicates that floating-point operations use the variable errno to report errors. More... | |
#define | MATH_ERREXCEPT 2 |
Indicates that floating-point exceptions are used. More... | |
#define | math_errhandling _math_errhandling |
Macro to access _math_errhandling. More... | |
#define | isgreater(x, y) ((isnan(x) || isnan(y)) ? 0 : ( (x) > (y) ? 1 : 0 )) |
The isnan macro determines whether its argument value is a NaN. More... | |
#define | isgreaterequal(x, y) ((isnan(x) || isnan(y)) ? 0 : ( (x) >= (y) ? 1 : 0 )) |
Check if value x is greather than y. More... | |
#define | isless(x, y) ((isnan(x) || isnan(y)) ? 0 : ( (x) < (y) ? 1 : 0 )) |
Check if value x is less than y. More... | |
#define | islessequal(x, y) ((isnan(x) || isnan(y)) ? 0 : ( (x) <= (y) ? 1 : 0 )) |
Check if value x is less or equal than y. More... | |
#define | islessgreater(x, y) ((isnan(x) || isnan(y)) ? 0 : ( (x) < (y) || (x) > (y) ? 1 : 0 )) |
Check if value x is less or greather than y. More... | |
#define | isunordered(x, y) ((isnan(x) || isnan(y)) ? 1 : 0 )) |
Check if value x or y is unordered. More... | |
#define | fpclasify(x) (sizeof(x) == sizeof(double) ? __math_fpclasify(x) : (sizeof(x) == sizeof(float) ? __math_fpclasifyf(x) : __math_fpclasifyl(x))) |
Classify floating-point value. More... | |
#define | isfinite(x) ((fpclasify(x) == FP_NORMAL || fpclasify(x) == FP_ZERO )) |
Is finite. More... | |
#define | isinf(x) (fpclasify(x) == FP_INFINITE) |
Is infinity. More... | |
#define | isnan(x) (fpclasify(x) == FP_NAN) |
Is Not-A-Number. More... | |
#define | isnormal(x) (fpclasify(x) == FP_NORMAL) |
Is normal. More... | |
#define | signbit(arg) (sizeof(arg) == sizeof(double) ? __math_signbit(arg) : (sizeof(arg) == sizeof(float) ? __math_signbitf(arg) : __math_signbitl(arg))) |
The signbit macro determines whether the sign of its argument value is negative. More... | |
#define | FP_FAST_FMA(x, y, z) (fma(x, y, z)) |
Multiply-add. More... | |
#define | FP_FAST_FMAF(x, y, z) (fmaf(x, y, z)) |
Multiply-add. More... | |
#define | FP_FAST_FMAL(x, y, z) (fmal(x, y, z)) |
Multiply-add. More... | |
#define | NAN (__math_NANf()) |
Returns quiet NAN. More... | |
#define | INFINITY (__math_INFf()) |
Returns infinity. More... | |
#define | HUGE_VAL (__math_INF()) |
Returns infinity. More... | |
#define | HUGE_VALF (__math_INFf()) |
Returns infinity. More... | |
#define | HUGE_VALL (__math_INFl()) |
Returns infinity. More... | |
Typedefs | |
typedef float | float_t |
Floating-point type. More... | |
typedef double | double_t |
Floating-point type. More... | |
Functions | |
double | cos (double x) |
Compute cosine. More... | |
float | cosf (float x) |
Compute cosine. More... | |
long double | cosl (long double x) |
Compute cosine. More... | |
double | sin (double x) |
Compute cosine. More... | |
float | sinf (float x) |
Compute cosine. More... | |
long double | sinl (long double x) |
Compute cosine. More... | |
double | tan (double x) |
Compute tangent. More... | |
float | tanf (float x) |
Compute tangent. More... | |
long double | tanl (long double x) |
Compute tangent. More... | |
double | acos (double x) |
Compute arc cosine. More... | |
float | acosf (float x) |
Compute arc cosine. More... | |
long double | acosl (long double x) |
Compute arc cosine. More... | |
double | asin (double x) |
Compute arc sine. More... | |
float | asinf (float x) |
Compute arc sine. More... | |
long double | asinl (long double x) |
Compute arc sine. More... | |
double | atan (double x) |
Compute arc tangent. More... | |
float | atanf (float x) |
Compute arc tangent. More... | |
long double | atanl (long double x) |
Compute arc tangent. More... | |
double | atan2 (double x, double y) |
Compute arc tangent with two parameters. More... | |
float | atan2f (float x, float y) |
Compute arc tangent with two parameters. More... | |
long double | atan2l (long double x, long double y) |
Compute arc tangent with two parameters. More... | |
double | cosh (double x) |
Compute hyperbolic cosine. More... | |
float | coshf (float x) |
Compute hyperbolic cosine. More... | |
long double | coshl (long double x) |
Compute hyperbolic cosine. More... | |
double | sinh (double x) |
Compute hyperbolic sine. More... | |
float | sinhf (float x) |
Compute hyperbolic sine. More... | |
long double | sinhl (long double x) |
Compute hyperbolic sine. More... | |
double | tanh (double x) |
Compute hyperbolic tangent. More... | |
float | tanhf (float x) |
Compute hyperbolic tangent. More... | |
long double | tanhl (long double x) |
Compute hyperbolic tangent. More... | |
double | acosh (double x) |
Compute area hyperbolic cosine. More... | |
float | acoshf (float x) |
Compute area hyperbolic cosine. More... | |
long double | acoshl (long double x) |
Compute area hyperbolic cosine. More... | |
double | asinh (double x) |
Compute area hyperbolic sine. More... | |
float | asinhf (float x) |
Compute area hyperbolic sine. More... | |
long double | asinhl (long double x) |
Compute area hyperbolic sine. More... | |
double | atanh (double x) |
Compute area hyperbolic tangent. More... | |
float | atanhf (float x) |
Compute area hyperbolic tangent. More... | |
long double | atanhl (long double x) |
Compute area hyperbolic tangent. More... | |
double | exp (double x) |
Compute exponential function. More... | |
float | expf (float x) |
Compute exponential function. More... | |
long double | expl (long double x) |
Compute exponential function. More... | |
double | frexp (double x, int *exp) |
Get significand and exponent. More... | |
float | frexpf (float x, int *exp) |
Get significand and exponent. More... | |
long double | frexpl (long double x, int *exp) |
Get significand and exponent. More... | |
double | ldexp (double x, int exp) |
Generate value from significand and exponent. More... | |
float | ldexpf (float x, int exp) |
Generate value from significand and exponent. More... | |
long double | ldexpl (long double x, int exp) |
Generate value from significand and exponent. More... | |
double | log (double x) |
Compute natural logarithm. More... | |
float | logf (float x) |
Compute natural logarithm. More... | |
long double | logl (long double x) |
Compute natural logarithm. More... | |
double | log10 (double x) |
Compute 10 based logarithm. More... | |
float | log10f (float x) |
Compute 10 based logarithm. More... | |
long double | log10l (long double x) |
Compute 10 based logarithm. More... | |
double | modf (double x, double *iptr) |
Break into fractional and integral parts. More... | |
float | modff (float x, float *iptr) |
Break into fractional and integral parts. More... | |
long double | modfl (long double x, long double *iptr) |
Break into fractional and integral parts. More... | |
double | exp2 (double x) |
Compute exponential function 2 based. More... | |
float | exp2f (float x) |
Compute exponential function 2 based. More... | |
long double | exp2l (long double x) |
Compute exponential function 2 based. More... | |
double | expm1 (double x) |
Compute exponential function minus 1. More... | |
float | expm1f (float x) |
Compute exponential function minus 1. More... | |
long double | expm1l (long double x) |
Compute exponential function minus 1. More... | |
int | ilogb (double x) |
Integer binary logarithm. More... | |
int | ilogbf (float x) |
Integer binary logarithm. More... | |
int | ilogbl (long double x) |
Integer binary logarithm. More... | |
double | log1p (double x) |
Compute natural logarithm of value + 1. More... | |
float | log1pf (float x) |
Compute natural logarithm of value + 1. More... | |
long double | log1pl (long double x) |
Compute natural logarithm of value + 1. More... | |
double | log2 (double x) |
Compute 2 based logarithm. More... | |
float | log2f (float x) |
Compute 2 based logarithm. More... | |
long double | log2l (long double x) |
Compute 2 based logarithm. More... | |
double | logb (double x) |
Compute logarithm using FLT_RADIX. More... | |
float | logbf (float x) |
Compute logarithm using FLT_RADIX. More... | |
long double | logbl (long double x) |
Compute logarithm using FLT_RADIX. More... | |
double | scalbn (double x, int n) |
Scale significand using floating-point base exponent. More... | |
float | scalbnf (float x, int n) |
Scale significand using floating-point base exponent. More... | |
long double | scalbnl (long double x, int n) |
Scale significand using floating-point base exponent. More... | |
double | scalbln (double x, long int n) |
Scale significand using floating-point base exponent. More... | |
float | scalblnf (float x, long int n) |
Scale significand using floating-point base exponent. More... | |
long double | scalblnl (long double x, long int n) |
Scale significand using floating-point base exponent. More... | |
double | pow (double base, double exponent) |
Compute power. More... | |
float | powf (float base, float exponent) |
Compute power. More... | |
long double | powl (long double base, long double exponent) |
Compute power. More... | |
double | sqrt (double x) |
Compute square root. More... | |
float | sqrtf (float x) |
Compute square root. More... | |
long double | sqrtl (long double x) |
Compute square root. More... | |
double | cbrt (double x) |
Compute cubic root. More... | |
float | cbrtf (float x) |
Compute cubic root. More... | |
long double | cbrtl (long double x) |
Compute cubic root. More... | |
double | hypot (double x, double y) |
Compute hypotenuse. More... | |
float | hypotf (float x, float y) |
Compute hypotenuse. More... | |
long double | hypotl (long double x, long double y) |
Compute hypotenuse. More... | |
double | erf (double x) |
Compute error function. More... | |
float | erff (float x) |
Compute error function. More... | |
long double | erfl (long double x) |
Compute error function. More... | |
double | erfc (double x) |
Compute complementary error function. More... | |
float | erfcf (float x) |
Compute complementary error function. More... | |
long double | erfcl (long double x) |
Compute complementary error function. More... | |
double | tgamma (double x) |
Compute gamma function. More... | |
float | tgammaf (float x) |
Compute gamma function. More... | |
long double | tgammal (long double x) |
Compute gamma function. More... | |
double | lgamma (double x) |
Compute gamma function. More... | |
float | lgammaf (float x) |
Compute gamma function. More... | |
long double | lgammal (long double x) |
Compute gamma function. More... | |
double | ceil (double x) |
Round up value. More... | |
float | ceilf (float x) |
Round up value. More... | |
long double | ceill (long double x) |
Round up value. More... | |
double | floor (double x) |
Round down value. More... | |
float | floorf (float x) |
Round down value. More... | |
long double | floorl (long double x) |
Round down value. More... | |
double | fmod (double numer, double denom) |
Compute remainder of division. More... | |
float | fmodf (float numer, float denom) |
Compute remainder of division. More... | |
long double | fmodl (long double numer, long double denom) |
Compute remainder of division. More... | |
double | trunc (double x) |
Truncate value. More... | |
float | truncf (float x) |
Truncate value. More... | |
long double | truncl (long double x) |
Truncate value. More... | |
double | round (double x) |
Round to nearest. More... | |
float | roundf (float x) |
Round to nearest. More... | |
long double | roundl (long double x) |
Round to nearest. More... | |
long int | lround (double x) |
Round to nearest and cast to long integer. More... | |
long int | lroundf (float x) |
Round to nearest and cast to long integer. More... | |
long int | lroundl (long double x) |
Round to nearest and cast to long integer. More... | |
long long int | llround (double x) |
Round to nearest and cast to long long integer. More... | |
long long int | llroundf (float x) |
Round to nearest and cast to long long integer. More... | |
long long int | llroundl (long double x) |
Round to nearest and cast to long long integer. More... | |
double | rint (double x) |
Round to integral value. More... | |
float | rintf (float x) |
Round to integral value. More... | |
long double | rintl (long double x) |
Round to integral value. More... | |
long int | lrint (double x) |
Round and cast to long integer. More... | |
long int | lrintf (float x) |
Round and cast to long integer. More... | |
long int | lrintl (long double x) |
Round and cast to long integer. More... | |
long long int | llrint (double x) |
Round and cast to long long integer. More... | |
long long int | llrintf (float x) |
Round and cast to long long integer. More... | |
long long int | llrintl (long double x) |
Round and cast to long long integer. More... | |
double | nearbyint (double x) |
Round to nearby integral value. More... | |
float | nearbyintf (float x) |
Round to nearby integral value. More... | |
long double | nearbyintl (long double x) |
Round to nearby integral value. More... | |
double | remainder (double x, double y) |
Compute reminder required by IEC 60559. More... | |
float | remainderf (float x, float y) |
Compute reminder required by IEC 60559. More... | |
long double | remainderl (long double x, long double y) |
Compute reminder required by IEC 60559. More... | |
double | remquo (double numer, double denom, int *quot) |
Compute remainder and quotient. More... | |
float | remquof (float numer, float denom, int *quot) |
Compute remainder and quotient. More... | |
long double | remquol (long double numer, long double denom, int *quot) |
Compute remainder and quotient. More... | |
double | copysign (double x, double y) |
Copy sign. More... | |
float | copysignf (float x, float y) |
Copy sign. More... | |
long double | copysignl (long double x, long double y) |
Copy sign. More... | |
double | nan (const char *arg) |
Generate quiet NaN. More... | |
float | nanf (const char *arg) |
Generate quiet NaN. More... | |
long double | nanl (const char *arg) |
Generate quiet NaN. More... | |
double | nextafter (double x, double y) |
Next representable value. More... | |
float | nextafterf (float x, float y) |
Next representable value. More... | |
long double | nextafterl (long double x, long double y) |
Next representable value. More... | |
double | nexttoward (double x, long double y) |
Next representable value toward precise value. More... | |
float | nexttowardf (float x, long double y) |
Next representable value toward precise value. More... | |
long double | nexttowardl (long double x, long double y) |
Next representable value toward precise value. More... | |
double | fdim (double x, double y) |
Positive difference. More... | |
float | fdimf (float x, float y) |
Positive difference. More... | |
long double | fdiml (long double x, long double y) |
Positive difference. More... | |
double | fmax (double x, double y) |
Higher value. More... | |
float | fmaxf (float x, float y) |
Higher value. More... | |
long double | fmaxl (long double x, long double y) |
Higher value. More... | |
double | fmin (double x, double y) |
Lower value. More... | |
float | fminf (float x, float y) |
Lower value. More... | |
long double | fminl (long double x, long double y) |
Lower value. More... | |
double | fabs (double x) |
Compute absolute value. More... | |
float | fabsf (float x) |
Compute absolute value. More... | |
long double | fabsl (long double x) |
Compute absolute value. More... | |
double | fma (double x, double y, double z) |
Multiply-add. More... | |
float | fmaf (float x, float y, float z) |
Multiply-add. More... | |
long double | fmal (long double x, long double y, long double z) |
Multiply-add. More... | |
int | __math_fpclasify (double x) |
Classify floating-point value. More... | |
int | __math_fpclasifyf (float x) |
Classify floating-point value. More... | |
int | __math_fpclasifyl (long double x) |
Classify floating-point value. More... | |
int | __math_signbit (double x) |
The signbit determines whether the sign of its argument value is negative. More... | |
int | __math_signbitf (float x) |
The signbit determines whether the sign of its argument value is negative. More... | |
int | __math_signbitl (long double x) |
The signbit determines whether the sign of its argument value is negative. More... | |
float | __math_NANf () |
Returns quiet NAN. More... | |
double | __math_INF () |
Returns infinity. More... | |
float | __math_INFf () |
Returns infinity. More... | |
long double | __math_INFl () |
Returns infinity. More... | |
Variables | |
int | _math_errhandling |
Expands to an expression of type int that is either equal to MATH_ERRNO, or equal to MATH_ERREXCEPT, or equal to their bitwise OR (MATH_ERRNO | MATH_ERREXCEPT). More... | |
#define FP_FAST_FMA | ( | x, | |
y, | |||
z | |||
) | (fma(x, y, z)) |
Multiply-add.
Compute (x × y) + z, rounded as one ternary operation: they compute the value (as if) to infinite precision and round once to the result format, according to the current rounding mode. A range error may occur.
x | Value to be multiplied. |
y | Value to be multiplied. |
z | Value to be added. |
#define FP_FAST_FMAF | ( | x, | |
y, | |||
z | |||
) | (fmaf(x, y, z)) |
Multiply-add.
Compute (x × y) + z, rounded as one ternary operation: they compute the value (as if) to infinite precision and round once to the result format, according to the current rounding mode. A range error may occur.
x | Value to be multiplied. |
y | Value to be multiplied. |
z | Value to be added. |
#define FP_FAST_FMAL | ( | x, | |
y, | |||
z | |||
) | (fmal(x, y, z)) |
Multiply-add.
Compute (x × y) + z, rounded as one ternary operation: they compute the value (as if) to infinite precision and round once to the result format, according to the current rounding mode. A range error may occur.
x | Value to be multiplied. |
y | Value to be multiplied. |
z | Value to be added. |
#define FP_ILOGB0 -2147483648 |
Arg of ilogb is zero.
#define FP_ILOGBNAN -2147483648 |
Arg of ilogb is NaN.
#define FP_INFINITE 0 |
Positive or negative infinity (overflow).
#define FP_NAN 1 |
Not-A-Number.
#define FP_NORMAL 4 |
Normal value (none of the above).
#define FP_SUBNORMAL 3 |
Sub-normal value (underflow)
#define FP_WTF 5 |
In normal case this shouldn't be returned.
#define FP_ZERO 2 |
Value of zero.
#define fpclasify | ( | x | ) | (sizeof(x) == sizeof(double) ? __math_fpclasify(x) : (sizeof(x) == sizeof(float) ? __math_fpclasifyf(x) : __math_fpclasifyl(x))) |
Classify floating-point value.
Returns a value of type int that matches one of the classification macro constants, depending on the value of x.
x | The value to classify. |
#define HUGE_VAL (__math_INF()) |
Returns infinity.
#define HUGE_VALF (__math_INFf()) |
Returns infinity.
#define HUGE_VALL (__math_INFl()) |
Returns infinity.
#define INFINITY (__math_INFf()) |
Returns infinity.
Is finite.
Returns whether x is a finite value. A finite value is any floating-point value that is neither infinite nor NaN (Not-A-Number).
x | The value to check. |
The isnan macro determines whether its argument value is a NaN.
The isgreater macro determines whether its first argument is greater than its second argument. The value of isgreater(x, y) is always equal to (x) > (y); however, unlike (x) > (y), isgreater(x, y) does not raise the ‘‘invalid’’ floating-point exception when x and y are unordered.
x | First value. |
y | Second value. |
Check if value x is greather than y.
The isgreaterequal macro determines whether its first argument is greater than or equal to its second argument. The value of isgreaterequal(x, y) is always equal to (x) >= (y); howev er, unlike (x) >= (y), isgreaterequal(x, y) does not raise the ‘‘invalid’’ floating-point exception when x and y are unordered.
x | First value. |
y | Second value. |
#define isinf | ( | x | ) | (fpclasify(x) == FP_INFINITE) |
Is infinity.
Returns whether x is an infinity value (either positive infinity or negative infinity).
x | The value to check. |
Check if value x is less than y.
The isless macro determines whether its first argument is less than its second argument. The value of isless(x, y) is always equal to (x) < (y); however, unlike (x) < (y), isless(x, y) does not raise the ‘‘invalid’’ floating-point exception when x and y are unordered.
x | First value. |
y | Second value. |
Check if value x is less or equal than y.
The islessequal macro determines whether its first argument is less than or equal to its second argument. The value of islessequal(x, y) is always equal to(x) <= (y); however, unlike (x) <= (y), islessequal(x, y) does not raise the ‘‘invalid’’ floating-point exception when x and y are unordered.
x | First value. |
y | Second value. |
Check if value x is less or greather than y.
The islessgreater macro determines whether its first argument is less than or greater than its second argument. The islessgreater(x, y) macro is similar to (x) < (y) || (x) > (y); however, islessgreater(x, y) does not raise the ‘‘invalid’’ floating-point exception when x and y are unordered (nor does it evaluate x and y twice).
x | First value. |
y | Second value. |
Is Not-A-Number.
Returns whether x is a NaN (Not-A-Number) value.
x | The value to check. |
Is normal.
Returns whether x is a normal value: i.e., whether it is neither infinity, NaN, zero or subnormal.
x | The value to check. |
Check if value x or y is unordered.
The isunordered macro determines whether its arguments are unordered.
x | First value. |
y | Second value. |
#define M_1_PI 0.31830988618379067154 |
The reciprocal of pi (1/pi).
#define M_2_PI 0.63661977236758134308 |
Two times the reciprocal of pi.
#define M_2_SQRTPI 1.12837916709551257390 |
Two times the reciprocal of the square root of pi.
#define M_E 2.7182818284590452354 |
The base of natural logarithms.
#define M_LN10 2.30258509299404568402 |
The natural logarithm of 10.
#define M_LN2 0.69314718055994530942 |
The natural logarithm of 2.
#define M_LOG10E 0.43429448190325182765 |
The logarithm to base 10 of M_E.
#define M_LOG2E 1.4426950408889634074 |
The logarithm to base 2 of M_E.
#define M_PI 3.14159265358979323846 |
Pi, the ratio of a circle’s circumference to its diameter.
#define M_PI_2 1.57079632679489661923 |
Pi divided by two.
#define M_PI_4 0.78539816339744830962 |
Pi divided by four.
#define M_SQRT1_2 0.70710678118654752440 |
The reciprocal of the square root of two (also the square root of 1/2).
#define M_SQRT2 1.41421356237309504880 |
The square root of two.
#define MATH_ERREXCEPT 2 |
Indicates that floating-point exceptions are used.
#define math_errhandling _math_errhandling |
Macro to access _math_errhandling.
The macro constant math_errhandling expands to an expression of type int that is either equal to MATH_ERRNO, or equal to MATH_ERREXCEPT, or equal to their bitwise OR (MATH_ERRNO | MATH_ERREXCEPT).
#define MATH_ERRNO 1 |
Indicates that floating-point operations use the variable errno to report errors.
#define NAN (__math_NANf()) |
Returns quiet NAN.
#define signbit | ( | arg | ) | (sizeof(arg) == sizeof(double) ? __math_signbit(arg) : (sizeof(arg) == sizeof(float) ? __math_signbitf(arg) : __math_signbitl(arg))) |
The signbit macro determines whether the sign of its argument value is negative.
arg | The value to check. |
typedef double double_t |
Floating-point type.
Alias of one of the fundamental floating-point types at least as wide as double.
typedef float float_t |
Floating-point type.
Alias of one of the fundamental floating-point types at least as wide as float.
int __math_fpclasify | ( | double | x | ) |
Classify floating-point value.
Returns a value of type int that matches one of the classification macro constants, depending on the value of x.
x | The value to classify. |
int __math_fpclasifyf | ( | float | x | ) |
Classify floating-point value.
Returns a value of type int that matches one of the classification macro constants, depending on the value of x.
x | The value to classify. |
int __math_fpclasifyl | ( | long double | x | ) |
Classify floating-point value.
Returns a value of type int that matches one of the classification macro constants, depending on the value of x.
x | The value to classify. |
double __math_INF | ( | ) |
Returns infinity.
float __math_INFf | ( | ) |
Returns infinity.
long double __math_INFl | ( | ) |
Returns infinity.
float __math_NANf | ( | ) |
Returns quiet NAN.
int __math_signbit | ( | double | x | ) |
The signbit determines whether the sign of its argument value is negative.
arg | The value to check. |
int __math_signbitf | ( | float | x | ) |
The signbit determines whether the sign of its argument value is negative.
arg | The value to check. |
int __math_signbitl | ( | long double | x | ) |
The signbit determines whether the sign of its argument value is negative.
arg | The value to check. |
double acos | ( | double | x | ) |
Compute arc cosine.
The acos functions compute the principal value of the arc cosine of x. A domain error occurs for arguments not in the interval [−1, +1].
x | Value whose arc cosine is computed, in the interval [-1,+1]. |
float acosf | ( | float | x | ) |
Compute arc cosine.
The acosf functions compute the principal value of the arc cosine of x. A domain error occurs for arguments not in the interval [−1, +1].
x | Value whose arc cosine is computed, in the interval [-1,+1]. |
double acosh | ( | double | x | ) |
Compute area hyperbolic cosine.
The acosh functions compute the (nonnegative) arc hyperbolic cosine of x. A domain error occurs for arguments less than 1.
x | Value whose area hyperbolic cosine is computed. |
float acoshf | ( | float | x | ) |
Compute area hyperbolic cosine.
The acoshf functions compute the (nonnegative) arc hyperbolic cosine of x. A domain error occurs for arguments less than 1.
x | Value whose area hyperbolic cosine is computed. |
long double acoshl | ( | long double | x | ) |
Compute area hyperbolic cosine.
The acoshl functions compute the (nonnegative) arc hyperbolic cosine of x. A domain error occurs for arguments less than 1.
x | Value whose area hyperbolic cosine is computed. |
long double acosl | ( | long double | x | ) |
Compute arc cosine.
The acosl functions compute the principal value of the arc cosine of x. A domain error occurs for arguments not in the interval [−1, +1].
x | Value whose arc cosine is computed, in the interval [-1,+1]. |
double asin | ( | double | x | ) |
Compute arc sine.
The asin functions compute the principal value of the arc sine of x. A domain error occurs for arguments not in the interval [−1, +1].
x | Value whose arc cosine is computed, in the interval [-1,+1]. |
float asinf | ( | float | x | ) |
Compute arc sine.
The asinf functions compute the principal value of the arc sine of x. A domain error occurs for arguments not in the interval [−1, +1].
x | Value whose arc cosine is computed, in the interval [-1,+1]. |
double asinh | ( | double | x | ) |
Compute area hyperbolic sine.
The asinh functions compute the arc hyperbolic sine of x.
x | Value whose area hyperbolic sine is computed. |
float asinhf | ( | float | x | ) |
Compute area hyperbolic sine.
The asinhf functions compute the arc hyperbolic sine of x.
x | Value whose area hyperbolic sine is computed. |
long double asinhl | ( | long double | x | ) |
Compute area hyperbolic sine.
The asinhl functions compute the arc hyperbolic sine of x.
x | Value whose area hyperbolic sine is computed. |
long double asinl | ( | long double | x | ) |
Compute arc sine.
The asinl functions compute the principal value of the arc sine of x. A domain error occurs for arguments not in the interval [−1, +1].
x | Value whose arc cosine is computed, in the interval [-1,+1]. |
double atan | ( | double | x | ) |
Compute arc tangent.
The atan functions compute the principal value of the arc tangent of x.
x | Value whose arc tangent is computed. |
double atan2 | ( | double | x, |
double | y | ||
) |
Compute arc tangent with two parameters.
The atan2 functions compute the value of the arc tangent of y/x, using the signs of both arguments to determine the quadrant of the return value. A domain error may occur if both arguments are zero.
x | Value representing the proportion of the y-coordinate. |
y | Value representing the proportion of the x-coordinate. |
float atan2f | ( | float | x, |
float | y | ||
) |
Compute arc tangent with two parameters.
The atan2f functions compute the value of the arc tangent of y/x, using the signs of both arguments to determine the quadrant of the return value. A domain error may occur if both arguments are zero.
x | Value representing the proportion of the y-coordinate. |
y | Value representing the proportion of the x-coordinate. |
long double atan2l | ( | long double | x, |
long double | y | ||
) |
Compute arc tangent with two parameters.
The atan2l functions compute the value of the arc tangent of y/x, using the signs of both arguments to determine the quadrant of the return value. A domain error may occur if both arguments are zero.
x | Value representing the proportion of the y-coordinate. |
y | Value representing the proportion of the x-coordinate. |
float atanf | ( | float | x | ) |
Compute arc tangent.
The atanf functions compute the principal value of the arc tangent of x.
x | Value whose arc tangent is computed. |
double atanh | ( | double | x | ) |
Compute area hyperbolic tangent.
The atanh functions compute the arc hyperbolic tangent of x. A domain error occurs for arguments not in the interval [−1, +1]. A pole error may occur if the argument equals −1 or +1.
x | Value whose area hyperbolic tangent is computed, in the interval [-1,+1]. |
float atanhf | ( | float | x | ) |
Compute area hyperbolic tangent.
The atanhf functions compute the arc hyperbolic tangent of x. A domain error occurs for arguments not in the interval [−1, +1]. A pole error may occur if the argument equals −1 or +1.
x | Value whose area hyperbolic tangent is computed, in the interval [-1,+1]. |
long double atanhl | ( | long double | x | ) |
Compute area hyperbolic tangent.
The atanhl functions compute the arc hyperbolic tangent of x. A domain error occurs for arguments not in the interval [−1, +1]. A pole error may occur if the argument equals −1 or +1.
x | Value whose area hyperbolic tangent is computed, in the interval [-1,+1]. |
long double atanl | ( | long double | x | ) |
Compute arc tangent.
The atanl functions compute the principal value of the arc tangent of x.
x | Value whose arc tangent is computed. |
double cbrt | ( | double | x | ) |
Compute cubic root.
The cbrt functions compute the cubic root of x.
x | Value whose cubic root is computed. |
float cbrtf | ( | float | x | ) |
Compute cubic root.
The cbrtf functions compute the cubic root of x.
x | Value whose cubic root is computed. |
long double cbrtl | ( | long double | x | ) |
Compute cubic root.
The cbrtl functions compute the cubic root of x.
x | Value whose cubic root is computed. |
double ceil | ( | double | x | ) |
Round up value.
The ceil functions compute the smallest integer value not less than x.
x | Value to round up. |
float ceilf | ( | float | x | ) |
Round up value.
The ceilf functions compute the smallest integer value not less than x.
x | Value to round up. |
long double ceill | ( | long double | x | ) |
Round up value.
The ceill functions compute the smallest integer value not less than x.
x | Value to round up. |
double copysign | ( | double | x, |
double | y | ||
) |
Copy sign.
The copysign functions produce a value with the magnitude of x and the sign of y. They produce a NaN (with the sign of y) if x is a NaN. On implementations that represent a signed zero but do not treat negative zero consistently in arithmetic operations, the copysign functions regard the sign of zero as positive.
x | Value with the magnitude of the resulting value. |
y | Value with the sign of the resulting value. |
float copysignf | ( | float | x, |
float | y | ||
) |
Copy sign.
The copysignf functions produce a value with the magnitude of x and the sign of y. They produce a NaN (with the sign of y) if x is a NaN. On implementations that represent a signed zero but do not treat negative zero consistently in arithmetic operations, the copysign functions regard the sign of zero as positive.
x | Value with the magnitude of the resulting value. |
y | Value with the sign of the resulting value. |
long double copysignl | ( | long double | x, |
long double | y | ||
) |
Copy sign.
The copysignl functions produce a value with the magnitude of x and the sign of y. They produce a NaN (with the sign of y) if x is a NaN. On implementations that represent a signed zero but do not treat negative zero consistently in arithmetic operations, the copysign functions regard the sign of zero as positive.
x | Value with the magnitude of the resulting value. |
y | Value with the sign of the resulting value. |
double cos | ( | double | x | ) |
Compute cosine.
The cos functions compute the cosine of x (measured in radians).
x | Value representing an angle expressed in radians. |
float cosf | ( | float | x | ) |
Compute cosine.
The cosf functions compute the cosine of x (measured in radians).
x | Value representing an angle expressed in radians. |
double cosh | ( | double | x | ) |
Compute hyperbolic cosine.
The cosh functions compute the hyperbolic cosine of x. A range error occurs if the magnitude of x is too large.
x | Value representing a hyperbolic angle. |
float coshf | ( | float | x | ) |
Compute hyperbolic cosine.
The coshf functions compute the hyperbolic cosine of x. A range error occurs if the magnitude of x is too large.
x | Value representing a hyperbolic angle. |
long double coshl | ( | long double | x | ) |
Compute hyperbolic cosine.
The coshl functions compute the hyperbolic cosine of x. A range error occurs if the magnitude of x is too large.
x | Value representing a hyperbolic angle. |
long double cosl | ( | long double | x | ) |
Compute cosine.
The cosl functions compute the cosine of x (measured in radians).
x | Value representing an angle expressed in radians. |
double erf | ( | double | x | ) |
Compute error function.
The erf functions compute the error function of x.
x | Parameter for the error function. |
double erfc | ( | double | x | ) |
Compute complementary error function.
The erfc functions compute the complementary error function of x. A range error occurs if x is too large.
x | Parameter for the complementary error function. |
float erfcf | ( | float | x | ) |
Compute complementary error function.
The erfcf functions compute the complementary error function of x. A range error occurs if x is too large.
x | Parameter for the complementary error function. |
long double erfcl | ( | long double | x | ) |
Compute complementary error function.
The erfcl functions compute the complementary error function of x. A range error occurs if x is too large.
x | Parameter for the complementary error function. |
float erff | ( | float | x | ) |
Compute error function.
The erff functions compute the error function of x.
x | Parameter for the error function. |
long double erfl | ( | long double | x | ) |
Compute error function.
The erfl functions compute the error function of x.
x | Parameter for the error function. |
double exp | ( | double | x | ) |
Compute exponential function.
The exp functions compute the base-e exponential of x. A range error occurs if the magnitude of x is too large.
x | Value of the exponent. |
double exp2 | ( | double | x | ) |
Compute exponential function 2 based.
The exp2 functions compute the base-2 exponential of x. A range error occurs if the magnitude of x is too large.
x | Value of the exponent. |
float exp2f | ( | float | x | ) |
Compute exponential function 2 based.
The exp2f functions compute the base-2 exponential of x. A range error occurs if the magnitude of x is too large.
x | Value of the exponent. |
long double exp2l | ( | long double | x | ) |
Compute exponential function 2 based.
The exp2l functions compute the base-2 exponential of x. A range error occurs if the magnitude of x is too large.
x | Value of the exponent. |
float expf | ( | float | x | ) |
Compute exponential function.
The expf functions compute the base-e exponential of x. A range error occurs if the magnitude of x is too large.
x | Value of the exponent. |
long double expl | ( | long double | x | ) |
Compute exponential function.
The expl functions compute the base-e exponential of x. A range error occurs if the magnitude of x is too large.
x | Value of the exponent. |
double expm1 | ( | double | x | ) |
Compute exponential function minus 1.
The expm1 functions compute the base-e exponential of the argument, minus 1. A range error occurs if x is too large.
x | Value of the exponent. |
float expm1f | ( | float | x | ) |
Compute exponential function minus 1.
The expm1f functions compute the base-e exponential of the argument, minus 1. A range error occurs if x is too large.
x | Value of the exponent. |
long double expm1l | ( | long double | x | ) |
Compute exponential function minus 1.
The expm1l functions compute the base-e exponential of the argument, minus 1. A range error occurs if x is too large.
x | Value of the exponent. |
double fabs | ( | double | x | ) |
Compute absolute value.
The fabs functions compute the absolute value of a floating-point number x.
x | Value among which the function selects a minimum. |
float fabsf | ( | float | x | ) |
Compute absolute value.
The fabsf functions compute the absolute value of a floating-point number x.
x | Value among which the function selects a minimum. |
long double fabsl | ( | long double | x | ) |
Compute absolute value.
The fabsl functions compute the absolute value of a floating-point number x.
x | Value among which the function selects a minimum. |
double fdim | ( | double | x, |
double | y | ||
) |
Positive difference.
The fdim functions determine the positive difference between their arguments.
x | Value whose difference is calculated. |
y | Value whose difference is calculated. |
float fdimf | ( | float | x, |
float | y | ||
) |
Positive difference.
The fdimf functions determine the positive difference between their arguments.
x | Value whose difference is calculated. |
y | Value whose difference is calculated. |
long double fdiml | ( | long double | x, |
long double | y | ||
) |
Positive difference.
The fdiml functions determine the positive difference between their arguments.
x | Value whose difference is calculated. |
y | Value whose difference is calculated. |
double floor | ( | double | x | ) |
Round down value.
The floor functions compute the largest integer value not greater than x.
x | Value to round down. |
float floorf | ( | float | x | ) |
Round down value.
The floorf functions compute the largest integer value not greater than x.
x | Value to round down. |
long double floorl | ( | long double | x | ) |
Round down value.
The floorl functions compute the largest integer value not greater than x.
x | Value to round down. |
double fma | ( | double | x, |
double | y, | ||
double | z | ||
) |
Multiply-add.
The fma functions compute (x × y) + z, rounded as one ternary operation: they compute the value (as if) to infinite precision and round once to the result format, according to the current rounding mode. A range error may occur.
x | Value to be multiplied. |
y | Value to be multiplied. |
z | Value to be added. |
float fmaf | ( | float | x, |
float | y, | ||
float | z | ||
) |
Multiply-add.
The fmaf functions compute (x × y) + z, rounded as one ternary operation: they compute the value (as if) to infinite precision and round once to the result format, according to the current rounding mode. A range error may occur.
x | Value to be multiplied. |
y | Value to be multiplied. |
z | Value to be added. |
long double fmal | ( | long double | x, |
long double | y, | ||
long double | z | ||
) |
Multiply-add.
The fmal functions compute (x × y) + z, rounded as one ternary operation: they compute the value (as if) to infinite precision and round once to the result format, according to the current rounding mode. A range error may occur.
x | Value to be multiplied. |
y | Value to be multiplied. |
z | Value to be added. |
double fmax | ( | double | x, |
double | y | ||
) |
Higher value.
The fmax functions determine the maximum numeric value of their arguments.
x | Value among which the function selects a maximum. |
y | Value among which the function selects a maximum. |
float fmaxf | ( | float | x, |
float | y | ||
) |
Higher value.
The fmaxf functions determine the maximum numeric value of their arguments.
x | Value among which the function selects a maximum. |
y | Value among which the function selects a maximum. |
long double fmaxl | ( | long double | x, |
long double | y | ||
) |
Higher value.
The fmaxl functions determine the maximum numeric value of their arguments.
x | Value among which the function selects a maximum. |
y | Value among which the function selects a maximum. |
double fmin | ( | double | x, |
double | y | ||
) |
Lower value.
The fmin functions determine the minimum numeric value of their arguments.
x | Value among which the function selects a minimum. |
y | Value among which the function selects a minimum. |
float fminf | ( | float | x, |
float | y | ||
) |
Lower value.
The fminf functions determine the minimum numeric value of their arguments.
x | Value among which the function selects a minimum. |
y | Value among which the function selects a minimum. |
long double fminl | ( | long double | x, |
long double | y | ||
) |
Lower value.
The fminl functions determine the minimum numeric value of their arguments.
x | Value among which the function selects a minimum. |
y | Value among which the function selects a minimum. |
double fmod | ( | double | numer, |
double | denom | ||
) |
Compute remainder of division.
The fmod functions compute the floating-point remainder of x/y.
numer | Value of the quotient numerator. |
denom | Value of the quotient denominator. |
float fmodf | ( | float | numer, |
float | denom | ||
) |
Compute remainder of division.
The fmodf functions compute the floating-point remainder of x/y.
numer | Value of the quotient numerator. |
denom | Value of the quotient denominator. |
long double fmodl | ( | long double | numer, |
long double | denom | ||
) |
Compute remainder of division.
The fmodl functions compute the floating-point remainder of x/y.
numer | Value of the quotient numerator. |
denom | Value of the quotient denominator. |
double frexp | ( | double | x, |
int * | exp | ||
) |
Get significand and exponent.
The frexp functions break a floating-point number into a normalized fraction and an integral power of 2. They store the integer in the int object pointed to by exp.
x | Value to be decomposed. |
exp | Pointer to an int where the value of the exponent is stored. |
float frexpf | ( | float | x, |
int * | exp | ||
) |
Get significand and exponent.
The frexpf functions break a floating-point number into a normalized fraction and an integral power of 2. They store the integer in the int object pointed to by exp.
x | Value to be decomposed. |
exp | Pointer to an int where the value of the exponent is stored. |
long double frexpl | ( | long double | x, |
int * | exp | ||
) |
Get significand and exponent.
The frexpl functions break a floating-point number into a normalized fraction and an integral power of 2. They store the integer in the int object pointed to by exp.
x | Value to be decomposed. |
exp | Pointer to an int where the value of the exponent is stored. |
double hypot | ( | double | x, |
double | y | ||
) |
Compute hypotenuse.
The hypot functions compute the square root of the sum of the squares of x and y, without undue overflow or underflow. A range error may occur.
x | Floating point value corresponding to the leg of a right-angled triangle for which the hypotenuse is computed. |
y | Floating point value corresponding to the leg of a right-angled triangle for which the hypotenuse is computed. |
float hypotf | ( | float | x, |
float | y | ||
) |
Compute hypotenuse.
The hypotf functions compute the square root of the sum of the squares of x and y, without undue overflow or underflow. A range error may occur.
x | Floating point value corresponding to the leg of a right-angled triangle for which the hypotenuse is computed. |
y | Floating point value corresponding to the leg of a right-angled triangle for which the hypotenuse is computed. |
long double hypotl | ( | long double | x, |
long double | y | ||
) |
Compute hypotenuse.
The hypotl functions compute the square root of the sum of the squares of x and y, without undue overflow or underflow. A range error may occur.
x | Floating point value corresponding to the leg of a right-angled triangle for which the hypotenuse is computed. |
y | Floating point value corresponding to the leg of a right-angled triangle for which the hypotenuse is computed. |
int ilogb | ( | double | x | ) |
Integer binary logarithm.
The ilogb functions extract the exponent of x as a signed int value. If x is zero they compute the value FP_ILOGB0; if x is infinite they compute the value INT_MAX; if x is a NaN they compute the value FP_ILOGBNAN; otherwise, they are equivalent to calling the corresponding logb function and casting the returned value to type int. A domain error or range error may occur if x is zero, infinite, or NaN. If the correct value is outside the range of the return type, the numeric result is unspecified.
x | Value whose ilogb is returned. |
int ilogbf | ( | float | x | ) |
Integer binary logarithm.
The ilogbf functions extract the exponent of x as a signed int value. If x is zero they compute the value FP_ILOGB0; if x is infinite they compute the value INT_MAX; if x is a NaN they compute the value FP_ILOGBNAN; otherwise, they are equivalent to calling the corresponding logb function and casting the returned value to type int. A domain error or range error may occur if x is zero, infinite, or NaN. If the correct value is outside the range of the return type, the numeric result is unspecified.
x | Value whose ilogbf is returned. |
int ilogbl | ( | long double | x | ) |
Integer binary logarithm.
The ilogbl functions extract the exponent of x as a signed int value. If x is zero they compute the value FP_ILOGB0; if x is infinite they compute the value INT_MAX; if x is a NaN they compute the value FP_ILOGBNAN; otherwise, they are equivalent to calling the corresponding logb function and casting the returned value to type int. A domain error or range error may occur if x is zero, infinite, or NaN. If the correct value is outside the range of the return type, the numeric result is unspecified.
x | Value whose ilogbl is returned. |
double ldexp | ( | double | x, |
int | exp | ||
) |
Generate value from significand and exponent.
The ldexp functions multiply a floating-point number by an integral power of 2. A range error may occur.
x | Generate value from significand and exponent |
exp | Value of the exponent. |
float ldexpf | ( | float | x, |
int | exp | ||
) |
Generate value from significand and exponent.
The ldexpf functions multiply a floating-point number by an integral power of 2. A range error may occur.
x | Generate value from significand and exponent |
exp | Value of the exponent. |
long double ldexpl | ( | long double | x, |
int | exp | ||
) |
Generate value from significand and exponent.
The ldexpl functions multiply a floating-point number by an integral power of 2. A range error may occur.
x | Generate value from significand and exponent |
exp | Value of the exponent. |
double lgamma | ( | double | x | ) |
Compute gamma function.
The lgamma functions compute the natural logarithm of the absolute value of gamma of x. A range error occurs if x is too large. A pole error may occur if x is a negative integer or zero.
x | Parameter for the log-gamma function. |
float lgammaf | ( | float | x | ) |
Compute gamma function.
The lgammaf functions compute the natural logarithm of the absolute value of gamma of x. A range error occurs if x is too large. A pole error may occur if x is a negative integer or zero.
x | Parameter for the log-gamma function. |
long double lgammal | ( | long double | x | ) |
Compute gamma function.
The lgammal functions compute the natural logarithm of the absolute value of gamma of x. A range error occurs if x is too large. A pole error may occur if x is a negative integer or zero.
x | Parameter for the log-gamma function. |
long long int llrint | ( | double | x | ) |
Round and cast to long long integer.
The llrint function round their argument to the nearest integer value, rounding according to the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
long long int llrintf | ( | float | x | ) |
Round and cast to long long integer.
The llrintf function round their argument to the nearest integer value, rounding according to the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
long long int llrintl | ( | long double | x | ) |
Round and cast to long long integer.
The llrintl function round their argument to the nearest integer value, rounding according to the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
long long int llround | ( | double | x | ) |
Round to nearest and cast to long long integer.
The lround and llround functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
long long int llroundf | ( | float | x | ) |
Round to nearest and cast to long long integer.
The lround and llround functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
long long int llroundl | ( | long double | x | ) |
Round to nearest and cast to long long integer.
The lround and llround functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
double log | ( | double | x | ) |
Compute natural logarithm.
The log functions compute the base-e (natural) logarithm of x. A domain error occurs if the argument is negative. A pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
double log10 | ( | double | x | ) |
Compute 10 based logarithm.
The log10 functions compute the base-10 (common) logarithm of x. A domain error occurs if the argument is negative. A pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
float log10f | ( | float | x | ) |
Compute 10 based logarithm.
The log10f functions compute the base-10 (common) logarithm of x. A domain error occurs if the argument is negative. A pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
long double log10l | ( | long double | x | ) |
Compute 10 based logarithm.
The log10l functions compute the base-10 (common) logarithm of x. A domain error occurs if the argument is negative. A pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
double log1p | ( | double | x | ) |
Compute natural logarithm of value + 1.
The log1p functions compute the base-e (natural) logarithm of 1 plus the argument. A domain error occurs if the argument is less than −1. A pole error may occur if the argument equals −1.
x | Value whose logarithm is calculated. |
float log1pf | ( | float | x | ) |
Compute natural logarithm of value + 1.
The log1pf functions compute the base-e (natural) logarithm of 1 plus the argument. A domain error occurs if the argument is less than −1. A pole error may occur if the argument equals −1.
x | Value whose logarithm is calculated. |
long double log1pl | ( | long double | x | ) |
Compute natural logarithm of value + 1.
The log1pl functions compute the base-e (natural) logarithm of 1 plus the argument. A domain error occurs if the argument is less than −1. A pole error may occur if the argument equals −1.
x | Value whose logarithm is calculated. |
double log2 | ( | double | x | ) |
Compute 2 based logarithm.
The log2 functions compute the base-2 logarithm of x. A domain error occurs if the argument is less than zero. A pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
float log2f | ( | float | x | ) |
Compute 2 based logarithm.
The log2f functions compute the base-2 logarithm of x. A domain error occurs if the argument is less than zero. A pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
long double log2l | ( | long double | x | ) |
Compute 2 based logarithm.
The log2l functions compute the base-2 logarithm of x. A domain error occurs if the argument is less than zero. A pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
double logb | ( | double | x | ) |
Compute logarithm using FLT_RADIX.
The logb functions extract the exponent of x, as a signed integer value in floating-point format. If x is subnormal it is treated as though it were normalized; thus, for positive finite x, 1 ≤ x × FLT_RADIX^(−log_b(x)) < FLT_RADIX. A domain error or pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
float logbf | ( | float | x | ) |
Compute logarithm using FLT_RADIX.
The logbf functions extract the exponent of x, as a signed integer value in floating-point format. If x is subnormal it is treated as though it were normalized; thus, for positive finite x, 1 ≤ x × FLT_RADIX^(−log_b(x)) < FLT_RADIX. A domain error or pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
long double logbl | ( | long double | x | ) |
Compute logarithm using FLT_RADIX.
The logbl functions extract the exponent of x, as a signed integer value in floating-point format. If x is subnormal it is treated as though it were normalized; thus, for positive finite x, 1 ≤ x × FLT_RADIX^(−log_b(x)) < FLT_RADIX. A domain error or pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
float logf | ( | float | x | ) |
Compute natural logarithm.
The logf functions compute the base-e (natural) logarithm of x. A domain error occurs if the argument is negative. A pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
long double logl | ( | long double | x | ) |
Compute natural logarithm.
The logl functions compute the base-e (natural) logarithm of x. A domain error occurs if the argument is negative. A pole error may occur if the argument is zero.
x | Value whose logarithm is calculated. |
long int lrint | ( | double | x | ) |
Round and cast to long integer.
The lrint function round their argument to the nearest integer value, rounding according to the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
long int lrintf | ( | float | x | ) |
Round and cast to long integer.
The lrintf function round their argument to the nearest integer value, rounding according to the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
long int lrintl | ( | long double | x | ) |
Round and cast to long integer.
The lrintl function round their argument to the nearest integer value, rounding according to the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
long int lround | ( | double | x | ) |
Round to nearest and cast to long integer.
The lround and llround functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
long int lroundf | ( | float | x | ) |
Round to nearest and cast to long integer.
The lround and llround functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
long int lroundl | ( | long double | x | ) |
Round to nearest and cast to long integer.
The lroundl and llround functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.
x | Value to round. |
double modf | ( | double | x, |
double * | iptr | ||
) |
Break into fractional and integral parts.
The modf functions break the argument value into integral and fractional parts, each of which has the same type and sign as the argument. They store the integral part (in floating-point format) in the object pointed to by iptr.
x | Floating point value to break into parts. |
iptr | Pointer to an object (of the same type as x) where the integral part is stored with the same sign as x. |
float modff | ( | float | x, |
float * | iptr | ||
) |
Break into fractional and integral parts.
The modff functions break the argument value into integral and fractional parts, each of which has the same type and sign as the argument. They store the integral part (in floating-point format) in the object pointed to by iptr.
x | Floating point value to break into parts. |
iptr | Pointer to an object (of the same type as x) where the integral part is stored with the same sign as x. |
long double modfl | ( | long double | x, |
long double * | iptr | ||
) |
Break into fractional and integral parts.
The modfl functions break the argument value into integral and fractional parts, each of which has the same type and sign as the argument. They store the integral part (in floating-point format) in the object pointed to by iptr.
x | Floating point value to break into parts. |
iptr | Pointer to an object (of the same type as x) where the integral part is stored with the same sign as x. |
double nan | ( | const char * | arg | ) |
Generate quiet NaN.
The call nan("n-char-sequence") is equivalent to strtod("NAN(n-charsequence)", (char**) NULL); the call nan("") is equivalent to strtod("NAN()", (char**) NULL). If tagp does not point to an n-char sequence or an empty string, the call is equivalent to strtod("NAN", (char**) NULL). Calls to nanf and nanl are equivalent to the corresponding calls to strtof and strtold.
arg | Narrow character string identifying the contents of a NaN. |
float nanf | ( | const char * | arg | ) |
Generate quiet NaN.
The call nan("n-char-sequence") is equivalent to strtod("NAN(n-charsequence)", (char**) NULL); the call nan("") is equivalent to strtod("NAN()", (char**) NULL). If tagp does not point to an n-char sequence or an empty string, the call is equivalent to strtod("NAN", (char**) NULL). Calls to nanf and nanl are equivalent to the corresponding calls to strtof and strtold.
arg | Narrow character string identifying the contents of a NaN. |
long double nanl | ( | const char * | arg | ) |
Generate quiet NaN.
The call nan("n-char-sequence") is equivalent to strtod("NAN(n-charsequence)", (char**) NULL); the call nan("") is equivalent to strtod("NAN()", (char**) NULL). If tagp does not point to an n-char sequence or an empty string, the call is equivalent to strtod("NAN", (char**) NULL). Calls to nanf and nanl are equivalent to the corresponding calls to strtof and strtold.
arg | Narrow character string identifying the contents of a NaN. |
double nearbyint | ( | double | x | ) |
Round to nearby integral value.
The nearbyint functions round their argument to an integer value in floating-point format, using the current rounding direction and without raising the ‘‘inexact’’ floatingpoint exception.
x | Value to round. |
float nearbyintf | ( | float | x | ) |
Round to nearby integral value.
The nearbyintf functions round their argument to an integer value in floating-point format, using the current rounding direction and without raising the ‘‘inexact’’ floatingpoint exception.
x | Value to round. |
long double nearbyintl | ( | long double | x | ) |
Round to nearby integral value.
The nearbyintl functions round their argument to an integer value in floating-point format, using the current rounding direction and without raising the ‘‘inexact’’ floatingpoint exception.
x | Value to round. |
double nextafter | ( | double | x, |
double | y | ||
) |
Next representable value.
The nextafter functions determine the next representable value, in the type of the function, after x in the direction of y, where x and y are first converted to the type of the function. The nextafter functions return y if x equals y. A range error may occur if the magnitude of x is the largest finite value representable in the type and the result is infinite or not representable in the type.
x | Base value. |
y | Value toward which the return value is approximated. |
float nextafterf | ( | float | x, |
float | y | ||
) |
Next representable value.
The nextafterf functions determine the next representable value, in the type of the function, after x in the direction of y, where x and y are first converted to the type of the function. The nextafterf functions return y if x equals y. A range error may occur if the magnitude of x is the largest finite value representable in the type and the result is infinite or not representable in the type.
x | Base value. |
y | Value toward which the return value is approximated. |
long double nextafterl | ( | long double | x, |
long double | y | ||
) |
Next representable value.
The nextafterl functions determine the next representable value, in the type of the function, after x in the direction of y, where x and y are first converted to the type of the function. The nextafterl functions return y if x equals y. A range error may occur if the magnitude of x is the largest finite value representable in the type and the result is infinite or not representable in the type.
x | Base value. |
y | Value toward which the return value is approximated. |
double nexttoward | ( | double | x, |
long double | y | ||
) |
Next representable value toward precise value.
The nexttoward functions are equivalent to the nextafter functions except that the second parameter has type long double and the functions return y converted to the type of the function if x equals y.
x | Base value. |
y | Value toward which the return value is approximated. |
float nexttowardf | ( | float | x, |
long double | y | ||
) |
Next representable value toward precise value.
The nexttowardf functions are equivalent to the nextafter functions except that the second parameter has type long double and the functions return y converted to the type of the function if x equals y.
x | Base value. |
y | Value toward which the return value is approximated. |
long double nexttowardl | ( | long double | x, |
long double | y | ||
) |
Next representable value toward precise value.
The nexttowardl functions are equivalent to the nextafter functions except that the second parameter has type long double and the functions return y converted to the type of the function if x equals y.
x | Base value. |
y | Value toward which the return value is approximated. |
double pow | ( | double | base, |
double | exponent | ||
) |
Compute power.
The pow functions compute x raised to the power y. A domain error occurs if x is finite and negative and y is finite and not an integer value. A range error may occur. A domain error may occur if x is zero and y is zero. A domain error or pole error may occur if x is zero and y is less than zero.
base | Base of power. |
exponent | Exponent of power. |
float powf | ( | float | base, |
float | exponent | ||
) |
Compute power.
The powf functions compute x raised to the power y. A domain error occurs if x is finite and negative and y is finite and not an integer value. A range error may occur. A domain error may occur if x is zero and y is zero. A domain error or pole error may occur if x is zero and y is less than zero.
base | Base of power. |
exponent | Exponent of power. |
long double powl | ( | long double | base, |
long double | exponent | ||
) |
Compute power.
The powl functions compute x raised to the power y. A domain error occurs if x is finite and negative and y is finite and not an integer value. A range error may occur. A domain error may occur if x is zero and y is zero. A domain error or pole error may occur if x is zero and y is less than zero.
base | Base of power. |
exponent | Exponent of power. |
double remainder | ( | double | x, |
double | y | ||
) |
Compute reminder required by IEC 60559.
The remainder functions compute the remainder x REM y required by IEC 60559.
x | Value of the quotient numerator.. |
y | Value of the quotient denominator.. |
float remainderf | ( | float | x, |
float | y | ||
) |
Compute reminder required by IEC 60559.
The remainderf functions compute the remainder x REM y required by IEC 60559.
x | Value of the quotient numerator.. |
y | Value of the quotient denominator.. |
long double remainderl | ( | long double | x, |
long double | y | ||
) |
Compute reminder required by IEC 60559.
The remainderl functions compute the remainder x REM y required by IEC 60559.
x | Value of the quotient numerator.. |
y | Value of the quotient denominator.. |
double remquo | ( | double | numer, |
double | denom, | ||
int * | quot | ||
) |
Compute remainder and quotient.
The remquo functions compute the same remainder as the remainder functions. In the object pointed to by quo they store a value whose sign is the sign of x/y and whose magnitude is congruent modulo 2n to the magnitude of the integral quotient of x/y, where n is an implementation-defined integer greater than or equal to 3.
numer | Floating point value with the quotient numerator. |
denom | Floating point value with the quotient denominator. |
quot | Pointer to an object where the quotient internally used to determine the remainder is stored as a value of type int. |
float remquof | ( | float | numer, |
float | denom, | ||
int * | quot | ||
) |
Compute remainder and quotient.
The remquof functions compute the same remainder as the remainder functions. In the object pointed to by quo they store a value whose sign is the sign of x/y and whose magnitude is congruent modulo 2n to the magnitude of the integral quotient of x/y, where n is an implementation-defined integer greater than or equal to 3.
numer | Floating point value with the quotient numerator. |
denom | Floating point value with the quotient denominator. |
quot | Pointer to an object where the quotient internally used to determine the remainder is stored as a value of type int. |
long double remquol | ( | long double | numer, |
long double | denom, | ||
int * | quot | ||
) |
Compute remainder and quotient.
The remquol functions compute the same remainder as the remainder functions. In the object pointed to by quo they store a value whose sign is the sign of x/y and whose magnitude is congruent modulo 2n to the magnitude of the integral quotient of x/y, where n is an implementation-defined integer greater than or equal to 3.
numer | Floating point value with the quotient numerator. |
denom | Floating point value with the quotient denominator. |
quot | Pointer to an object where the quotient internally used to determine the remainder is stored as a value of type int. |
double rint | ( | double | x | ) |
Round to integral value.
The rint functions round their argument to an integer value in floating-point format, using the current rounding direction.
x | Value to round. |
float rintf | ( | float | x | ) |
Round to integral value.
The rintf functions round their argument to an integer value in floating-point format, using the current rounding direction.
x | Value to round. |
long double rintl | ( | long double | x | ) |
Round to integral value.
The rintl functions round their argument to an integer value in floating-point format, using the current rounding direction.
x | Value to round. |
double round | ( | double | x | ) |
Round to nearest.
The round functions round their argument to the nearest integer value in floating-point format, rounding halfway cases away from zero, regardless of the current rounding direction.
x | Value to round. |
float roundf | ( | float | x | ) |
Round to nearest.
The roundf functions round their argument to the nearest integer value in floating-point format, rounding halfway cases away from zero, regardless of the current rounding direction.
x | Value to round. |
long double roundl | ( | long double | x | ) |
Round to nearest.
The roundl functions round their argument to the nearest integer value in floating-point format, rounding halfway cases away from zero, regardless of the current rounding direction.
x | Value to round. |
double scalbln | ( | double | x, |
long int | n | ||
) |
Scale significand using floating-point base exponent.
The scalbln function compute x × FLT_RADIX^n efficiently, not normally by computing FLT_RADIX^n explicitly. A range error may occur.
x | Value representing the significand. |
n | Value of the exponent. |
float scalblnf | ( | float | x, |
long int | n | ||
) |
Scale significand using floating-point base exponent.
The scalblnf function compute x × FLT_RADIX^n efficiently, not normally by computing FLT_RADIX^n explicitly. A range error may occur.
x | Value representing the significand. |
n | Value of the exponent. |
long double scalblnl | ( | long double | x, |
long int | n | ||
) |
Scale significand using floating-point base exponent.
The scalblnl function compute x × FLT_RADIX^n efficiently, not normally by computing FLT_RADIX^n explicitly. A range error may occur.
x | Value representing the significand. |
n | Value of the exponent. |
double scalbn | ( | double | x, |
int | n | ||
) |
Scale significand using floating-point base exponent.
The scalbn function compute x × FLT_RADIX^n efficiently, not normally by computing FLT_RADIX^n explicitly. A range error may occur.
x | Value representing the significand. |
n | Value of the exponent. |
float scalbnf | ( | float | x, |
int | n | ||
) |
Scale significand using floating-point base exponent.
The scalbnf function compute x × FLT_RADIX^n efficiently, not normally by computing FLT_RADIX^n explicitly. A range error may occur.
x | Value representing the significand. |
n | Value of the exponent. |
long double scalbnl | ( | long double | x, |
int | n | ||
) |
Scale significand using floating-point base exponent.
The scalbnl function compute x × FLT_RADIX^n efficiently, not normally by computing FLT_RADIX^n explicitly. A range error may occur.
x | Value representing the significand. |
n | Value of the exponent. |
double sin | ( | double | x | ) |
Compute cosine.
The sin functions compute the sine of x (measured in radians).
x | Value representing an angle expressed in radians. |
float sinf | ( | float | x | ) |
Compute cosine.
The sinf functions compute the sine of x (measured in radians).
x | Value representing an angle expressed in radians. |
double sinh | ( | double | x | ) |
Compute hyperbolic sine.
The sinh functions compute the hyperbolic sine of x. A range error occurs if the magnitude of x is too large.
x | Value representing a hyperbolic angle. |
float sinhf | ( | float | x | ) |
Compute hyperbolic sine.
The sinhf functions compute the hyperbolic sine of x. A range error occurs if the magnitude of x is too large.
x | Value representing a hyperbolic angle. |
long double sinhl | ( | long double | x | ) |
Compute hyperbolic sine.
The sinhl functions compute the hyperbolic sine of x. A range error occurs if the magnitude of x is too large.
x | Value representing a hyperbolic angle. |
long double sinl | ( | long double | x | ) |
Compute cosine.
The sinl functions compute the sine of x (measured in radians).
x | Value representing an angle expressed in radians. |
double sqrt | ( | double | x | ) |
Compute square root.
The sqrt functions compute the nonnegative square root of x. A domain error occurs if the argument is less than zero.
x | Value whose square root is computed. |
float sqrtf | ( | float | x | ) |
Compute square root.
The sqrtf functions compute the nonnegative square root of x. A domain error occurs if the argument is less than zero.
x | Value whose square root is computed. |
long double sqrtl | ( | long double | x | ) |
Compute square root.
The sqrtl functions compute the nonnegative square root of x. A domain error occurs if the argument is less than zero.
x | Value whose square root is computed. |
double tan | ( | double | x | ) |
Compute tangent.
The tan functions compute the tangent of x (measured in radians).
x | Value representing an angle, expressed in radians. |
float tanf | ( | float | x | ) |
Compute tangent.
The tanf functions compute the tangent of x (measured in radians).
x | Value representing an angle, expressed in radians. |
double tanh | ( | double | x | ) |
Compute hyperbolic tangent.
The tanh functions compute the hyperbolic tangent of x.
x | Value representing a hyperbolic angle. |
float tanhf | ( | float | x | ) |
Compute hyperbolic tangent.
The tanhf functions compute the hyperbolic tangent of x.
x | Value representing a hyperbolic angle. |
long double tanhl | ( | long double | x | ) |
Compute hyperbolic tangent.
The tanhl functions compute the hyperbolic tangent of x.
x | Value representing a hyperbolic angle. |
long double tanl | ( | long double | x | ) |
Compute tangent.
The tanl functions compute the tangent of x (measured in radians).
x | Value representing an angle, expressed in radians. |
double tgamma | ( | double | x | ) |
Compute gamma function.
The tgamma functions compute the gamma function of x. A domain error or pole error may occur if x is a negative integer or zero. A range error occurs if the magnitude of x is too large and may occur if the magnitude of x is too small.
x | Parameter for the gamma function. |
float tgammaf | ( | float | x | ) |
Compute gamma function.
The tgammaf functions compute the gamma function of x. A domain error or pole error may occur if x is a negative integer or zero. A range error occurs if the magnitude of x is too large and may occur if the magnitude of x is too small.
x | Parameter for the gamma function. |
long double tgammal | ( | long double | x | ) |
Compute gamma function.
The tgammal functions compute the gamma function of x. A domain error or pole error may occur if x is a negative integer or zero. A range error occurs if the magnitude of x is too large and may occur if the magnitude of x is too small.
x | Parameter for the gamma function. |
double trunc | ( | double | x | ) |
Truncate value.
The trunc functions round their argument to the integer value, in floating format, nearest to but no larger in magnitude than the argument.
x | Value to truncate. |
float truncf | ( | float | x | ) |
Truncate value.
The truncf functions round their argument to the integer value, in floating format, nearest to but no larger in magnitude than the argument.
x | Value to truncate. |
long double truncl | ( | long double | x | ) |
Truncate value.
The truncl functions round their argument to the integer value, in floating format, nearest to but no larger in magnitude than the argument.
x | Value to truncate. |
int _math_errhandling |
Expands to an expression of type int that is either equal to MATH_ERRNO, or equal to MATH_ERREXCEPT, or equal to their bitwise OR (MATH_ERRNO | MATH_ERREXCEPT).