Mathematical functions are as follows.
Table 7.6
Mathematical Functions
Function/Macro Name
Outline
fpclassify [V1.08 or later]
Classifies a floating-point number as NaN, infinite, normal, subnormal or zero (C99)
isfinite [V1.08 or later]
Determines whether a floating-point number has a finite value (zero, subnormal, or normal) (C99)
isinf [V1.08 or later]
Determines whether a floating-point number is an infinity (C99)
isnan [V1.08 or later]
Determines whether a floating-point number is a NaN (C99)
isnormal [V1.08 or later]
Determines whether a floating-point number is normal (neither zero, subnormal, infinite, nor NaN) (C99)
signbit [V1.08 or later]
Determines whether the sign of a floating-point number is negative (C99)
acos
Arc cosine
acosf
acosl [V1.08 or later]
Arc cosine (C99)
asin
Arc sine
asinf
asinl [V1.08 or later]
Arc sine (C99)
atan
Arc tangent
atanf
atanl [V1.08 or later]
Arc tangent (C99)
atan2
Arc tangent (y / x)
atan2f
atan2l [V1.08 or later]
Arc tangent (y / x) (C99)
cos
Cosine
cosf
cosl [V1.08 or later]
Cosine (C99)
sin
Sine
sinf
sinl [V1.08 or later]
Sine (C99)
tan
Tangent
tanf
tanl [V1.08 or later]
Tangent (C99)
acosh [V1.08 or later]
Arc hyperbolic cosine (C99)
acoshf [V1.08 or later]
acoshl [V1.08 or later]
asinh [V1.08 or later]
Arc hyperbolic sine (C99)
asinhf [V1.08 or later]
asinhl [V1.08 or later]
atanh [V1.08 or later]
Arc hyperbolic tangent (C99)
atanhf [V1.08 or later]
atanhl [V1.08 or later]
cosh
Hyperbolic cosine
coshf
coshl [V1.08 or later]
Hyperbolic cosine (C99)
sinh
Hyperbolic sine
sinhf
sinhl [V1.08 or later]
Hyperbolic sine (C99)
tanh
Hyperbolic tangent
tanhf
tanhl [V1.08 or later]
Hyperbolic tangent (C99)
exp
Exponent function (natural logarithm)
expf
expl [V1.08 or later]
Exponent function (natural logarithm) (C99)
frexp
Break a floating-point number into a normalized fraction and an integral power of 2
frexpf
frexpl [V1.08 or later]
Break a floating-point number into a normalized fraction and an integral power of 2 (C99)
ldexp
Multiply a floating-point number by an integral power of 2
ldexpf
ldexpl [V1.08 or later]
Multiply a floating-point number by an integral power of 2 (C99)
log
Logarithmic function (natural logarithm)
logf
logl [V1.08 or later]
Logarithmic function (natural logarithm) (C99)
log10
Logarithmic function (base = 10)
log10f
log10l [V1.08 or later]
Logarithmic function (base = 10) (C99)
log1p [V1.08 or later]
Natural logarithm of 1 plus the argument (C99)
log1pf [V1.08 or later]
log1pl [V1.08 or later]
modf
Break a floating-point number into integral and fractional parts
modff
modfl [V1.08 or later]
Break a floating-point number into integral and fractional parts (C99)
scalbn [V1.09 or later]
Multiply a floating-point number by an integral power of FLT_RADIX (C99)
scalbnf [V1.09 or later]
scalbnl [V1.09 or later]
scalbln [V1.09 or later]
scalblnf [V1.09 or later]
scalblnl [V1.09 or later]
fabs
Absolute value function
fabsf
fabsl [V1.08 or later]
Absolute value function (C99)
pow
Power function
powf
powl [V1.08 or later]
Power function (C99)
sqrt
Square root function
sqrtf
sqrtl [V1.08 or later]
Square root function (C99)
ceil
The smallest integer value not less than a floating-point number
ceilf
ceill [V1.08 or later]
The smallest integer value not less than a floating-point number (C99)
floor
The largest integer value not greater than a floating-point number
floorf
floorl [V1.08 or later]
The largest integer value not greater than a floating-point number (C99)
nearbyint [V1.09 or later]
Rounding to an integer value in floating-point format according to the current rounding direction (C99)
nearbyintf [V1.09 or later]
nearbyintl [V1.09 or later]
rint [V1.09 or later]
rintf [V1.09 or later]
rintl [V1.09 or later]
lrint [V1.09 or later]
Rounding to a long type integer value according to the current rounding direction (C99)
lrintf [V1.09 or later]
lrintl [V1.09 or later]
llrint [V1.09 or later]
Rounding to a long long type integer value according to the current rounding direction (C99)
llrintf [V1.09 or later]
llrintl [V1.09 or later]
round [V1.09 or later]
Rounding to integer value in floating-point format (C99)
roundf [V1.09 or later]
roundl [V1.09 or later]
lround [V1.09 or later]
Rounding to a long type integer value (C99)
lroundf [V1.09 or later]
lroundl [V1.09 or later]
llround [V1.09 or later]
Rounding to a long long type integer value (C99)
llroundf [V1.09 or later]
llroundl [V1.09 or later]
trunc [V1.09 or later]
Rounding to truncated integer value (C99)
truncf [V1.09 or later]
truncl [V1.09 or later]
fmod
Remainder function
fmodf
fmodl [V1.08 or later]
Remainder function (C99)
copysign [V1.09 or later]
Generates a value consisting of the given absolute value and sign (C99)
copysignf [V1.09 or later]
copysignl [V1.09 or later]
nan [V1.09 or later]
Convert character string to NaN (C99)
nanf [V1.09 or later]
nanl [V1.09 or later]
fdim [V1.09 or later]
Calculation of the positive difference (C99)
fdimf [V1.09 or later]
fdiml [V1.09 or later]
fmax [V1.09 or later]
Obtaing the greater value (C99)
fmaxf [V1.09 or later]
fmaxl [V1.09 or later]
fmin [V1.09 or later]
Obtaing the smaller value (C99)
fminf [V1.09 or later]
fminl [V1.09 or later]
isgreater [V1.09 or later]
Determining whether the first argument is greater than the second argument (C99)
isgreaterequal [V1.09 or later]
Determining whether the first argument is equal to or greater than the second argument (C99)
isless [V1.09 or later]
Determining whether the first argument is smaller than the second argument (C99)
islessequal [V1.09 or later]
Determining whether the first argument is equal to or smaller than the second argument (C99)
islessgreater [V1.09 or later]
Determining whether the first argument is smaller or greater than the second argument (C99)
isunordered [V1.09 or later]
Determining whether the arguments are not ordered (C99)