Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Mathematical functions

&pagelevel(3)&pagelevel

Integer arithmetic

Name

Brief description

abs

Absolute value (integer)

div

Division (integer)

labs

Absolute value (long integer)

llabs

Absolute value (long long integer)

ldiv

Division (long integer)

lldiv

Division (long long integer)

Floating-point numbers

Name

Brief description

acos, acosf, acosl

Arc cosine

asin, asin, asinl

Arc sine

atan, atanf, atanl

Arc tangent x

atan2, atan2f, atan2l

Arc tangent x/y

cabs

Absolute value of a complex number

ceil

Round up to integer

cos, cosf, cosl

Cosine

cosh, coshf, coshl

Hyperbolic cosine

erf, erff, erfl

Error function

erfc, erfcf, erfcl

Complement of the error function

exp, expf, expl

Exponential function (base e)

expm1, expm1f, expm1l

Exponential function (base e)  - 1

exp2, exp2f, exp2l

Exponential function (base 2)

fabs, fabsf, fabsl

Absolute value of a floating-point number

fdim, fdimf, fdiml

Positive difference

floor

Round down to an integer

fmod, fmodf, fmodl

Remainder of a division

frexp, frexpf, frexpl

Normalized representation in base 2

gamma

Logarithmic gamma function

hypot, hypotf, hypotl

Euclidean distance

j0, j1, jn

Bessel functions of the first kind

ldexp, ldexpf, ldexpl

Calculate binary value

lgamma, lgammaf, lgammal

Logarithmic gamma function

log, logf, logl

Natural log

log10, log10f, log10l

Base 10 log

log1p, log1pf, log1pl

Natural log + 1

log2, log2f, log2l

Base 2 log

modf, modff, modfl

Split into integer part and fractional part

nearbyint, nearbyintf,
nearbyintl

Nearest integer

pow, powf, powl

General exponential function

sin, sinf, sinl

Sine

sinh, sinhf, sinhl

Hyperbolic sine

sqrt, sqrtf, sqrtl

Square root

tan, tanf, tanl

Tangent

tanh, tanhf, tanhl

Hyperbolic tangent

y0, y1, yn

Bessel functions of the second kind

Functions for rounding (dependent on rounding mode)

Name

Brief description

llrint, llrintf, llrintl

Rounds floating-point number to nearest integer of type long long int 

lrint, lrintf, lrintl

Rounds floating-point number to nearest integer of type long int

rint, rintf, rintl

Rounds floating-point number to nearest integer as floating-point number 

nearbyint, nearbyintf,
nearbyintl

Rounds floating-point number to nearest integer as floating-point number 

Functions for rounding (independent of rounding mode)

Name

Brief description

ceil, ceilf, ceill

Rounds floating-point number up to nearest integer as floating-point number

floor, floorf, floorl

Rounds floating-point number down to nearest integer as floating-point number

llround, llroundf, llroundl

Rounds floating-point number to nearest integer of type long long int

lround, lroundf, lroundl

Rounds floating-point number to nearest integer of type long int

round, roundf, roundl

Rounds floating-point number to nearest integer as floating-point number

trunc, truncf, truncl

Rounds floating-point number to nearest integer towards 0 as floating-point number