nulib.c.math

Bindings to C standard library math functions.

Members

Functions

acos
double acos(double x)
acosf
float acosf(float x)

Computes arc-cosine of the given value.

acosh
double acosh(double x)
acoshf
float acoshf(float x)

Computes hyperbolic arc-cosine of the given value.

asin
double asin(double x)
asinf
float asinf(float x)

Computes arc-sine of the given value.

asinh
double asinh(double x)
asinhf
float asinhf(float x)

Computes hyperbolic arc-sine of the given value.

atan
double atan(double x)

Computes arc-tangent of the given value.

atan2
double atan2(double y, double x)
atan2f
float atan2f(float y, float x)

Computes arc-tangent of the given value, using signs to determine quadrant.

atanf
float atanf(float x)

Computes arc-tangent of the given value.

atanh
double atanh(double x)
atanhf
float atanhf(float x)

Computes hyperbolic arc-tangent of the given value.

cbrt
double cbrt(double x)
cbrtf
float cbrtf(float x)

Computes the cube root of the given value.

ceil
double ceil(double x)
ceilf
float ceilf(float x)

Computes the nearest integer value greater than the given value.

cos
double cos(double x)
cosf
float cosf(float x)

Computes cosine of the given value.

cosh
double cosh(double x)
coshf
float coshf(float x)

Computes hyperbolic cosine of the given value.

erf
double erf(double x)

Computes the error function of the given value.

erfc
double erfc(double x)
erfcf
float erfcf(float x)

Computes the complementary error function of the given value.

erff
float erff(float x)

Computes the error function of the given value.

exp
double exp(double arg)

Computes e raised to the given power.

exp2
double exp2(double arg)
exp2f
float exp2f(float arg)

Computes 2 raised to the given power.

expf
float expf(float arg)

Computes e raised to the given power.

expm1
double expm1(double arg)
expm1f
float expm1f(float arg)

Computes e raised to the given power minus one.

fabs
double fabs(double value)
fabsf
float fabsf(float value)

Computes the absolute value for the given value.

fdim
double fdim(double x, double y)
fdimf
float fdimf(float x, float y)

Computes the positive difference between 2 values.

floor
double floor(double x)
floorf
float floorf(float x)

Computes the nearest integer value lower than the given value.

fma
double fma(double x, double y, double z)
fmaf
float fmaf(float x, float y, float z)

Computes the fused-multiply-add operation.

fmod
double fmod(double x, double y)
fmodf
float fmodf(float x, float y)

Computes the remainder of the floating point division.

hypot
double hypot(double x, double y)
hypotf
float hypotf(float x, float y)

Computes the square root of the sum of the squares of the given values.

labs
int labs(int value)

Computes the absolute value for the given value.

lgamma
double lgamma(double x)
lgammaf
float lgammaf(float x)

Computes the natural (base-e) logarithm of the gamma function of the given value.

llabs
long llabs(long value)

Computes the absolute value for the given value.

log
double log(double arg)

Computes the natural (base-e) logarithm.

log10
double log10(double arg)
log10f
float log10f(float arg)

Computes the common (base-10) logarithm.

log2
double log2(double arg)
log2f
float log2f(float arg)

Computes the binary (base-2) logarithm.

logf
float logf(float arg)

Computes the natural (base-e) logarithm.

pow
double pow(double x, double y)
powf
float powf(float x, float y)

Computes a value raised to a given power.

remainder
double remainder(double x, double y)
remainderf
float remainderf(float x, float y)

Computes the remainder of the floating point division.

round
double round(double x)
roundf
float roundf(float x)

Computes the nearest integer value, rounded away from 0.

sin
double sin(double x)
sinf
float sinf(float x)

Computes sine of the given value.

sinh
double sinh(double x)
sinhf
float sinhf(float x)

Computes hyperbolic sine of the given value.

sqrt
double sqrt(double x)
sqrtf
float sqrtf(float x)

Computes the square root of the given value.

tan
double tan(double x)
tanf
float tanf(float x)

Computes tangent of the given value.

tanh
double tanh(double x)
tanhf
float tanhf(float x)

Computes hyperbolic tangent of the given value.

tgamma
double tgamma(double x)
tgammaf
float tgammaf(float x)

Computes the gamma function of the given value.

trunc
double trunc(double x)
truncf
float truncf(float x)

Computes the nearest integer value lower in magnitude than the given value.

Meta

Authors

Luna Nielsen