9 #define abs(a) (((a) < 0) ? -(a) : (a))
12 #define max(a, b) (((a) > (b)) ? (a) : (b))
15 #define min(a, b) (((a) < (b)) ? (a) : (b))
18 #define sign(x) ((x < 0) ? -1 : ((x > 0) ? 1 : 0))
21 #define round_up(number, base) (((number) + (base)-1) & ~((base)-1))
24 #define M_E 2.7182818284590452354
27 #define M_LOG2E 1.4426950408889634074
30 #define M_LOG10E 0.43429448190325182765
33 #define M_LN2 0.69314718055994530942
36 #define M_LN10 2.30258509299404568402
39 #define M_PI 3.14159265358979323846
42 #define M_PI_2 1.57079632679489661923
45 #define M_PI_4 0.78539816339744830962
48 #define M_1_PI 0.31830988618379067154
51 #define M_2_PI 0.63661977236758134308
54 #define M_2_SQRTPI 1.12837916709551257390
57 #define M_SQRT2 1.41421356237309504880
60 #define M_SQRT1_2 0.70710678118654752440
67 double round(
double x);
74 double ceil(
double x);
80 double floor(
double x);
95 double pow(
double base,
double exponent);
106 double exp(
double x);
111 double fabs(
double x);
116 float fabsf(
float x);
122 double sqrt(
double x);
128 float sqrtf(
float x);
143 double log10(
double x);
154 double logx(
double x,
double y);
160 double modf(
double x,
double *intpart);
double ceil(double x)
Rounds x upward, returning the smallest integral value that is not less than x.
Definition: math.c:33
double logx(double x, double y)
Logarithm function in base x.
Definition: math.c:149
double pow(double base, double exponent)
Returns base raised to the power exponent:
Definition: math.c:48
float sqrtf(float x)
Returns the square root of x.
Definition: math.c:103
double log10(double x)
Logarithm function in base 10.
Definition: math.c:135
double floor(double x)
Rounds x downward, returning the largest integral value that is not greater than x.
Definition: math.c:18
double round(double x)
Returns the integral value that is nearest to x, with halfway cases rounded away from zero.
Definition: math.c:9
double ln(double x)
Natural logarithm function.
Definition: math.c:140
int isinf(double x)
Checks if the input value is Infinite (INF).
Definition: math.c:112
double fabs(double x)
Returns the absolute value of x: |x|.
Definition: math.c:76
float fabsf(float x)
Returns the absolute value of x: |x|.
Definition: math.c:85
double sqrt(double x)
Returns the square root of x.
Definition: math.c:94
double exp(double x)
Returns the base-e exponential function of x, which is e raised to the power x: e^x.
Definition: math.c:71
double modf(double x, double *intpart)
Breaks x into an integral and a fractional part, both parts have the same sign as x.
Definition: math.c:161
int isnan(double x)
Checks if the input value is Not A Number (NAN).
Definition: math.c:123