View Source math (stdlib v6.0)

Mathematical functions.

This module provides an interface to a number of mathematical functions.

Note

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.

Summary

Functions

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Returns the error function of X, where

erfc(X) returns 1.0 - erf(X), computed by methods that avoid cancellation for large X.

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Ratio of the circumference of a circle to its diameter.

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

Equivalent to tanh/1

A collection of mathematical functions that return floats. Arguments are numbers.

Ratio of the circumference of a circle to its radius.

Functions

Link to this function

acos(X)

View Source (since OTP 18.0,OTP 20.0)
-spec acos(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

acosh(X)

View Source (since OTP 18.0,OTP 20.0)
-spec acosh(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

asin(X)

View Source (since OTP 18.0,OTP 20.0)
-spec asin(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

asinh(X)

View Source (since OTP 18.0,OTP 20.0)
-spec asinh(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

atan2(Y, X)

View Source (since OTP 18.0,OTP 20.0)
-spec atan2(Y, X) -> float() when Y :: number(), X :: number().

Equivalent to tanh/1

Link to this function

atan(X)

View Source (since OTP 18.0,OTP 20.0)
-spec atan(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

atanh(X)

View Source (since OTP 18.0,OTP 20.0)
-spec atanh(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

ceil(X)

View Source (since OTP 18.0,OTP 20.0)
-spec ceil(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

cos(X)

View Source (since OTP 18.0,OTP 20.0)
-spec cos(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

cosh(X)

View Source (since OTP 18.0,OTP 20.0)
-spec cosh(X) -> float() when X :: number().

Equivalent to tanh/1

-spec 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.
-spec erfc(X) -> float() when X :: number().

erfc(X) returns 1.0 - erf(X), computed by methods that avoid cancellation for large X.

Link to this function

exp(X)

View Source (since OTP 18.0,OTP 20.0)
-spec exp(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

floor(X)

View Source (since OTP 18.0,OTP 20.0)
-spec floor(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

fmod(X, Y)

View Source (since OTP 18.0,OTP 20.0)
-spec fmod(X, Y) -> float() when X :: number(), Y :: number().

Equivalent to tanh/1

Link to this function

log2(X)

View Source (since OTP 18.0,OTP 20.0)
-spec log2(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

log10(X)

View Source (since OTP 18.0,OTP 20.0)
-spec log10(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

log(X)

View Source (since OTP 18.0,OTP 20.0)
-spec log(X) -> float() when X :: number().

Equivalent to tanh/1

-spec pi() -> float().

Ratio of the circumference of a circle to its diameter.

Floating point approximation of mathematical constant pi.

Link to this function

pow(X, Y)

View Source (since OTP 18.0,OTP 20.0)
-spec pow(X, Y) -> float() when X :: number(), Y :: number().

Equivalent to tanh/1

Link to this function

sin(X)

View Source (since OTP 18.0,OTP 20.0)
-spec sin(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

sinh(X)

View Source (since OTP 18.0,OTP 20.0)
-spec sinh(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

sqrt(X)

View Source (since OTP 18.0,OTP 20.0)
-spec sqrt(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

tan(X)

View Source (since OTP 18.0,OTP 20.0)
-spec tan(X) -> float() when X :: number().

Equivalent to tanh/1

Link to this function

tanh(X)

View Source (since OTP 18.0,OTP 20.0)
-spec tanh(X) -> float() when X :: number().

A collection of mathematical functions that return floats. Arguments are numbers.

-spec tau() -> float().

Ratio of the circumference of a circle to its radius.

This constant is equivalent to a full turn when described in radians.

The same as 2 * pi().