7.5.4 Mathematical functions

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

Arc cosine

acosl [V1.08 or later]

Arc cosine (C99)

asin

Arc sine

asinf

Arc sine

asinl [V1.08 or later]

Arc sine (C99)

atan

Arc tangent

atanf

Arc tangent

atanl [V1.08 or later]

Arc tangent (C99)

atan2

Arc tangent (y / x)

atan2f

Arc tangent (y / x)

atan2l [V1.08 or later]

Arc tangent (y / x) (C99)

cos

Cosine

cosf

Cosine

cosl [V1.08 or later]

Cosine (C99)

sin

Sine

sinf

Sine

sinl [V1.08 or later]

Sine (C99)

tan

Tangent

tanf

Tangent

tanl [V1.08 or later]

Tangent (C99)

acosh [V1.08 or later]

Arc hyperbolic cosine (C99)

acoshf [V1.08 or later]

Arc hyperbolic cosine (C99)

acoshl [V1.08 or later]

Arc hyperbolic cosine (C99)

asinh [V1.08 or later]

Arc hyperbolic sine (C99)

asinhf [V1.08 or later]

Arc hyperbolic sine (C99)

asinhl [V1.08 or later]

Arc hyperbolic sine (C99)

atanh [V1.08 or later]

Arc hyperbolic tangent (C99)

atanhf [V1.08 or later]

Arc hyperbolic tangent (C99)

atanhl [V1.08 or later]

Arc hyperbolic tangent (C99)

cosh

Hyperbolic cosine

coshf

Hyperbolic cosine

coshl [V1.08 or later]

Hyperbolic cosine (C99)

sinh

Hyperbolic sine

sinhf

Hyperbolic sine

sinhl [V1.08 or later]

Hyperbolic sine (C99)

tanh

Hyperbolic tangent

tanhf

Hyperbolic tangent

tanhl [V1.08 or later]

Hyperbolic tangent (C99)

exp

Exponent function (natural logarithm)

expf

Exponent function (natural logarithm)

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

Break a floating-point number into a normalized fraction and an integral power of 2

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

Multiply a floating-point number by an integral power of 2

ldexpl [V1.08 or later]

Multiply a floating-point number by an integral power of 2 (C99)

log

Logarithmic function (natural logarithm)

logf

Logarithmic function (natural logarithm)

logl [V1.08 or later]

Logarithmic function (natural logarithm) (C99)

log10

Logarithmic function (base = 10)

log10f

Logarithmic function (base = 10)

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]

Natural logarithm of 1 plus the argument (C99)

log1pl [V1.08 or later]

Natural logarithm of 1 plus the argument (C99)

modf

Break a floating-point number into integral and fractional parts

modff

Break a floating-point number into integral and fractional parts

modfl [V1.08 or later]

Break a floating-point number into integral and fractional parts (C99)

fabs

Absolute value function

fabsf

Absolute value function

fabsl [V1.08 or later]

Absolute value function (C99)

pow

Power function

powf

Power function

powl [V1.08 or later]

Power function (C99)

sqrt

Square root function

sqrtf

Square root function

sqrtl [V1.08 or later]

Square root function (C99)

ceil

The smallest integer value not less than a floating-point number

ceilf

The smallest integer value not less than a floating-point number

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

The largest integer value not greater than a floating-point number

floorl [V1.08 or later]

The largest integer value not greater than a floating-point number (C99)

fmod

Remainder function

fmodf

Remainder function

fmodl [V1.08 or later]

Remainder function (C99)