|
ginnOS
The reference: libc, the libraries and the kernel
|
floating-point functions (double, and float with an f). More...
Go to the source code of this file.
Macros | |
| #define | M_E 2.7182818284590452354 |
| #define | M_LOG2E 1.4426950408889634074 |
| #define | M_LOG10E 0.43429448190325182765 |
| #define | M_LN2 0.69314718055994530942 |
| #define | M_LN10 2.30258509299404568402 |
| #define | M_PI 3.14159265358979323846 |
| #define | M_PI_2 1.57079632679489661923 |
| #define | M_PI_4 0.78539816339744830962 |
| #define | M_1_PI 0.31830988618379067154 |
| #define | M_2_PI 0.63661977236758134308 |
| #define | M_2_SQRTPI 1.12837916709551257390 |
| #define | M_SQRT2 1.41421356237309504880 |
| #define | M_SQRT1_2 0.70710678118654752440 |
| #define | HUGE_VAL (__builtin_huge_val()) |
| #define | INFINITY (__builtin_inff()) |
| #define | NAN (__builtin_nanf("")) |
| #define | HUGE_VALF (__builtin_huge_valf()) |
| #define | HUGE_VALL (__builtin_huge_vall()) |
| #define | isnan(x) |
| #define | isinf(x) |
| #define | isfinite(x) |
| #define | signbit(x) |
Functions | |
| double | fabs (double x) |
| double | fmin (double a, double b) |
| the smaller (larger) of two; a NaN gives the other one | |
| double | fmax (double a, double b) |
| double | floor (double x) |
| double | ceil (double x) |
| double | round (double x) |
| double | trunc (double x) |
| double | fmod (double x, double y) |
| double | sqrt (double x) |
| double | sin (double x) |
| double | cos (double x) |
| double | tan (double x) |
| double | atan (double x) |
| double | atan2 (double y, double x) |
| double | asin (double x) |
| double | acos (double x) |
| double | exp (double x) |
| double | log (double x) |
| double | log2 (double x) |
| double | log10 (double x) |
| double | pow (double x, double y) |
| double | ldexp (double x, int exponent) |
| x * 2^exponent | |
| double | scalbn (double x, int exponent) |
| double | frexp (double x, int *exponent) |
| split x into a fraction in [0.5, 1) (or 0) and a power of 2: x = fraction * 2^*exponent. | |
| long double | fabsl (long double x) |
| long double | fmodl (long double x, long double y) |
| long double | frexpl (long double x, int *exponent) |
| long double | ldexpl (long double x, int exponent) |
| long double | scalbnl (long double x, int exponent) |
| long double | copysignl (long double x, long double y) |
| x with the sign of y | |
| double | copysign (double x, double y) |
| double | sinh (double x) |
| double | cosh (double x) |
| double | tanh (double x) |
| float | fabsf (float x) |
| float | floorf (float x) |
| float | ceilf (float x) |
| float | roundf (float x) |
| float | truncf (float x) |
| float | sqrtf (float x) |
| float | sinf (float x) |
| float | cosf (float x) |
| float | tanf (float x) |
| float | atanf (float x) |
| float | asinf (float x) |
| float | acosf (float x) |
| float | expf (float x) |
| float | logf (float x) |
| float | log2f (float x) |
| float | log10f (float x) |
| float | sinhf (float x) |
| float | coshf (float x) |
| float | tanhf (float x) |
| float | fminf (float a, float b) |
| float | fmaxf (float a, float b) |
| float | fmodf (float a, float b) |
| float | atan2f (float a, float b) |
| float | powf (float a, float b) |
| float | copysignf (float a, float b) |
| float | ldexpf (float x, int exp) |
| float | scalbnf (float x, int n) |
| float | frexpf (float x, int *exp) |
floating-point functions (double, and float with an f).
the functions use the x87 FPU instructions, which exist on i686 and on x86_64. the results are as exact as those instructions give; errno is not set.
| #define M_E 2.7182818284590452354 |
| #define M_LOG2E 1.4426950408889634074 |
| #define M_LOG10E 0.43429448190325182765 |
| #define M_LN2 0.69314718055994530942 |
| #define M_LN10 2.30258509299404568402 |
| #define M_PI 3.14159265358979323846 |
| #define M_PI_2 1.57079632679489661923 |
| #define M_PI_4 0.78539816339744830962 |
| #define M_1_PI 0.31830988618379067154 |
| #define M_2_PI 0.63661977236758134308 |
| #define M_2_SQRTPI 1.12837916709551257390 |
| #define M_SQRT2 1.41421356237309504880 |
| #define M_SQRT1_2 0.70710678118654752440 |
| #define HUGE_VAL (__builtin_huge_val()) |
| #define INFINITY (__builtin_inff()) |
| #define NAN (__builtin_nanf("")) |
| #define HUGE_VALF (__builtin_huge_valf()) |
| #define HUGE_VALL (__builtin_huge_vall()) |
| #define isnan | ( | x | ) |
| #define isinf | ( | x | ) |
| #define isfinite | ( | x | ) |
| #define signbit | ( | x | ) |
| double fabs | ( | double | x | ) |
| double fmin | ( | double | a, |
| double | b ) |
the smaller (larger) of two; a NaN gives the other one
| double fmax | ( | double | a, |
| double | b ) |
| double floor | ( | double | x | ) |
| double ceil | ( | double | x | ) |
| double round | ( | double | x | ) |
| double trunc | ( | double | x | ) |
| double fmod | ( | double | x, |
| double | y ) |
| double sqrt | ( | double | x | ) |
| double sin | ( | double | x | ) |
| double cos | ( | double | x | ) |
| double tan | ( | double | x | ) |
| double atan | ( | double | x | ) |
| double atan2 | ( | double | y, |
| double | x ) |
| double asin | ( | double | x | ) |
| double acos | ( | double | x | ) |
| double exp | ( | double | x | ) |
| double log | ( | double | x | ) |
| double log2 | ( | double | x | ) |
| double log10 | ( | double | x | ) |
| double pow | ( | double | x, |
| double | y ) |
| double ldexp | ( | double | x, |
| int | exponent ) |
x * 2^exponent
| double scalbn | ( | double | x, |
| int | exponent ) |
| double frexp | ( | double | x, |
| int * | exponent ) |
split x into a fraction in [0.5, 1) (or 0) and a power of 2: x = fraction * 2^*exponent.
| long double fabsl | ( | long double | x | ) |
| long double fmodl | ( | long double | x, |
| long double | y ) |
| long double frexpl | ( | long double | x, |
| int * | exponent ) |
| long double ldexpl | ( | long double | x, |
| int | exponent ) |
| long double scalbnl | ( | long double | x, |
| int | exponent ) |
| long double copysignl | ( | long double | x, |
| long double | y ) |
x with the sign of y
| double copysign | ( | double | x, |
| double | y ) |
| double sinh | ( | double | x | ) |
| double cosh | ( | double | x | ) |
| double tanh | ( | double | x | ) |
| float fabsf | ( | float | x | ) |
| float floorf | ( | float | x | ) |
| float ceilf | ( | float | x | ) |
| float roundf | ( | float | x | ) |
| float truncf | ( | float | x | ) |
| float sqrtf | ( | float | x | ) |
| float sinf | ( | float | x | ) |
| float cosf | ( | float | x | ) |
| float tanf | ( | float | x | ) |
| float atanf | ( | float | x | ) |
| float asinf | ( | float | x | ) |
| float acosf | ( | float | x | ) |
| float expf | ( | float | x | ) |
| float logf | ( | float | x | ) |
| float log2f | ( | float | x | ) |
| float log10f | ( | float | x | ) |
| float sinhf | ( | float | x | ) |
| float coshf | ( | float | x | ) |
| float tanhf | ( | float | x | ) |
| float fminf | ( | float | a, |
| float | b ) |
| float fmaxf | ( | float | a, |
| float | b ) |
| float fmodf | ( | float | a, |
| float | b ) |
| float atan2f | ( | float | a, |
| float | b ) |
| float powf | ( | float | a, |
| float | b ) |
| float copysignf | ( | float | a, |
| float | b ) |
| float ldexpf | ( | float | x, |
| int | exp ) |
| float scalbnf | ( | float | x, |
| int | n ) |
| float frexpf | ( | float | x, |
| int * | exp ) |