Defines | |
#define | FLT_RADIX 2 |
FLT_RADIX specifies the radix of the exponent representation. | |
#define | DBL_MAX_EXP +1024 |
DBL_MAX_EXP is the maximum value of base FLT_RADIX in the exponent part of a double. | |
#define | DBL_MIN_EXP -1021 |
DBL_MIN_EXP is the minimum value of base FLT_RADIX in the exponent part of a double. | |
#define | DBL_MAX 1.7976931348623157E+308 |
DBL_MAX is the maximum value of a double. | |
#define | DBL_MIN 2.2250738585072014E-308 |
DBL_MIN is the minimum value of a double. | |
#define | DBL_MANT_DIG 53 |
DBL_MANT_DIG specifies the number of base FLT_RADIX digits in the mantissa part of a double. | |
#define | EDOM 0x01 |
EDOM - an input argument is outside the defined domain of the mathematical function. | |
#define | ERANGE 0x03 |
ERANGE - the result of the function is too large (overflow) or too small (underflow) to be represented in the available space. | |
#define | DBL_EXP_BIAS 1023 |
Exponent bias. | |
#define | DBL_EXP_INFNAN 2047 |
The biggest one. | |
#define | HUGE_VAL |
Some constants (Hart & Cheney). | |
#define | M_PI 3.14159265358979323846264338327950288 |
Pi, the ratio of a circles circumference to its diameter. | |
#define | M_2PI 6.28318530717958647692528676655900576 |
Two times of pi. | |
#define | M_3PI_4 2.35619449019234492884698253745962716 |
pi * 3 / 4 | |
#define | M_PI_2 1.57079632679489661923132169163975144 |
Pi divided by two. | |
#define | M_3PI_8 1.17809724509617246442349126872981358 |
pi * 3 / 8 | |
#define | M_PI_4 0.78539816339744830961566084581987572 |
Pi divided by four. | |
#define | M_PI_8 0.39269908169872415480783042290993786 |
Pi divided by eight. | |
#define | M_1_PI 0.31830988618379067153776752674502872 |
The reciprocal of pi (1/pi). | |
#define | M_2_PI 0.63661977236758134307553505349005744 |
Two times the reciprocal of pi. | |
#define | M_4_PI 1.27323954473516268615107010698011488 |
Four times the reciprocal of pi. | |
#define | M_E 2.71828182845904523536028747135266250 |
The base of natural logarithms. | |
#define | M_LOG2E 1.44269504088896340735992468100189213 |
The logarithm to base 2 of M_E. | |
#define | M_LOG10E 0.43429448190325182765112891891660508 |
The logarithm to base 10 of M_E. | |
#define | M_LN2 0.69314718055994530941723212145817657 |
The natural logarithm of 2. | |
#define | M_LN10 2.30258509299404568401799145468436421 |
The natural logarithm of 10. | |
#define | M_SQRT2 1.41421356237309504880168872420969808 |
The square root of two. | |
#define | M_1_SQRT2 0.70710678118654752440084436210484904 |
The reciprocal of the square root of two. | |
#define | M_EULER 0.57721566490153286060651209008240243 |
The Euler/Mascheroni constant. | |
#define | POLYNOM1(x, a) ((a)[1]*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM2(x, a) (POLYNOM1((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM3(x, a) (POLYNOM2((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM4(x, a) (POLYNOM3((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM5(x, a) (POLYNOM4((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM6(x, a) (POLYNOM5((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM7(x, a) (POLYNOM6((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM8(x, a) (POLYNOM7((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM9(x, a) (POLYNOM8((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM10(x, a) (POLYNOM9((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM11(x, a) (POLYNOM10((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM12(x, a) (POLYNOM11((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | POLYNOM13(x, a) (POLYNOM12((x),(a)+1)*(x)+(a)[0]) |
macros for constructing polynomials | |
#define | M_LN_MAX_D (M_LN2 * DBL_MAX_EXP) |
The mystery of mathematics. | |
#define | M_LN_MIN_D (M_LN2 * (DBL_MIN_EXP - 1)) |
The mystery of mathematics - 1. | |
#define | DEG_TO_RAD(x) ((x) * 0.017453292519943295769236907684886) |
From degree to radiant. | |
#define | RAD_TO_DEG(x) ((x) * 57.295779513082320876798154814105) |
From radiant to degree. | |
#define | errno (*__errno()) |
Integer variable errno, which is set by system calls and some library functions in the event of an error to indicate what went wrong. | |
Functions | |
double | cos (double x) |
Compute cosine. Returns the cosine of an angle of x radians. | |
double | sin (double x) |
Compute sine. Returns the sine of an angle of x radians. | |
double | tan (double x) |
Compute tangent. Returns the tangent of an angle of x radians. | |
double | acos (double x) |
Compute arc cosine. Returns the principal value of the arc cosine of x, expressed in radians. In trigonometrics, arc cosine is the inverse operation of cosine. | |
double | asin (double x) |
Returns the principal value of the arc sine of x, expressed in radians. In trigonometrics, arc sine is the inverse operation of sine. | |
double | atan (double x) |
Compute arc tangent. Returns the principal value of the arc tangent of x, expressed in radians. In trigonometrics, arc tangent is the inverse operation of tangent. Notice that because of the sign ambiguity, the function cannot determine with certainty in which quadrant the angle falls only by its tangent value. See atan2 for an alternative that takes a fractional argument instead. | |
double | atan2 (double y, double x) |
Compute arc tangent with two parameters. Returns the principal value of the arc tangent of y/x, expressed in radians. To compute the value, the function takes into account the sign of both arguments in order to determine the quadrant. If both arguments passed are zero, a domain error occurs. | |
double | cosh (double x) |
Compute hyperbolic cosine. Returns the hyperbolic cosine of x radians. | |
double | sinh (double x) |
Compute hyperbolic sine. Returns the hyperbolic sine of x radians. | |
double | tanh (double x) |
Compute hyperbolic tangent. Returns the hyperbolic tangent of x radians. | |
double | exp (double x) |
Compute exponential function. Returns the base-e exponential function of x, which is e raised to the power x: e^x. | |
double | frexp (double x, int *eptr) |
Get significand and exponent. Breaks the floating point number x into its binary significand (a floating point with an absolute value between 0.5(included) and 1.0(excluded)) and an integral exponent for 2, such that: x = significand * 2^exponent The exponent is stored in the location pointed by exp, and the significand is the value returned by the function. If x is zero, both parts (significand and exponent) are zero. If x is negative, the significand returned by this function is negative. | |
double | ldexp (double x, int exp) |
Generate value from significand and exponent. Returns the result of multiplying x (the significand) by 2 raised to the power of exp (the exponent). lexpr(x,exp) = x * 2^exp. | |
double | log (double x) |
Compute natural logarithm. Returns the natural logarithm of x. The natural logarithm is the base-e logarithm: the inverse of the natural exponential function (exp). For common (base-10) logarithms, see log10. | |
double | log10 (double x) |
Compute common logarithm. Returns the common (base-10) logarithm of x. | |
double | modf (double x, double *ip) |
Break into fractional and integral parts. Breaks x into an integral and a fractional part. The integer part is stored in the object pointed by intpart, and the fractional part is returned by the function. Both parts have the same sign as x. | |
double | remainder (double numer, double denom) |
Compute remainder. Returns the floating-point remainder of numer/denom (rounded to nearest): remainder = numer - rquot * denom Where rquot is the result of: numer/denom, rounded toward the nearest integral value (with halfway cases rounded toward the even number). A similar function, fmod, returns the same but with the quotient truncated (rounded towards zero) instead. | |
double | pow (double base, double exponent) |
Raise to power. Returns base raised to the power exponent: base^exponent . | |
double | sqrt (double x) |
Compute square root. | |
double | fmod (double numer, double denom) |
Compute remainder of division. Returns the floating-point remainder of numer/denom (rounded towards zero): fmod = numer - tquot * denom Where tquot is the truncated (i.e., rounded towards zero) result of: numer/denom. | |
double | ceil (double x) |
Round up value. Rounds x upward, returning the smallest integral value that is not less than x. | |
double | floor (double x) |
Round down value. Rounds x downward, returning the largest integral value that is not greater than x. | |
int | __IsNan (double d) |
Is Not-A-Number. Returns whether x is a NaN (Not-A-Number) value. The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0. | |
double | sign (double x) |
Returns a value indicating the sign of a double-precision floating-point number. | |
double | fabs (double x) |
Returns the absolute value of x: |x|. | |
int | signbit (double x) |
Sign bit. Returns whether the sign of x is negative. | |
int | isfinite (double x) |
Is finite value. Returns whether x is a finite value. A finite value is any floating-point value that is neither infinite nor NaN (Not-A-Number). | |
int | isnan (double x) |
Is Not-A-Number. Returns whether x is a NaN (Not-A-Number) value. The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0. | |
int | isinf (double x) |
Is infinity. Returns whether x is an infinity value (either positive infinity or negative infinity). |