math (stdlib v3.15.2)
This module provides an interface to a number of mathematical functions.
Not all functions are provided on all platforms. In particular, the erf/1
and erfc/1
functions are not provided on Windows.
Limitations
As these are the C library, the same limitations apply.
Link to this section Summary
Functions
A collection of mathematical functions that return floats. Arguments are numbers.
Returns the error function of X
, where
erfc(X)
returns 1.0
- erf(X)
, computed by methods that avoid cancellation for large X
.
A useful number.
Link to this section Functions
Specs
acos(X) -> float() when X :: number().
A collection of mathematical functions that return floats. Arguments are numbers.
Specs
acosh(X) -> float() when X :: number().
Specs
asin(X) -> float() when X :: number().
Specs
asinh(X) -> float() when X :: number().
Specs
atan(X) -> float() when X :: number().
Specs
atan2(Y, X) -> float() when Y :: number(), X :: number().
Specs
atanh(X) -> float() when X :: number().
Specs
ceil(X) -> float() when X :: number().
Specs
cos(X) -> float() when X :: number().
Specs
cosh(X) -> float() when X :: number().
Link to this function
erf/1
Specs
erf(X) -> float() when X :: number().
Returns the error function of X
, where:
erf(X) = 2/sqrt(pi)*integral from 0 to X of exp(-t*t) dt.
Link to this function
erfc/1
Specs
erfc(X) -> float() when X :: number().
erfc(X)
returns 1.0
- erf(X)
, computed by methods that avoid cancellation for large X
.
Specs
exp(X) -> float() when X :: number().
Specs
floor(X) -> float() when X :: number().
Specs
fmod(X, Y) -> float() when X :: number(), Y :: number().
Specs
log(X) -> float() when X :: number().
Specs
log10(X) -> float() when X :: number().
Specs
log2(X) -> float() when X :: number().
Specs
pi() -> float().
A useful number.
Specs
pow(X, Y) -> float() when X :: number(), Y :: number().
Specs
sin(X) -> float() when X :: number().
Specs
sinh(X) -> float() when X :: number().
Specs
sqrt(X) -> float() when X :: number().
Specs
tan(X) -> float() when X :: number().
Specs
tanh(X) -> float() when X :: number().