math

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.

Functions


acos(X) -> float()

  • X = number()

acosh(X) -> float()

  • X = number()

asin(X) -> float()

  • X = number()

asinh(X) -> float()

  • X = number()

atan(X) -> float()

  • X = number()

atan2(Y, X) -> float()

  • Y = X = number()

atanh(X) -> float()

  • X = number()

ceil(X) -> float()

  • X = number()

cos(X) -> float()

  • X = number()

cosh(X) -> float()

  • X = number()

exp(X) -> float()

  • X = number()

floor(X) -> float()

  • X = number()

fmod(X, Y) -> float()

  • X = Y = number()

log(X) -> float()

  • X = number()

log10(X) -> float()

  • X = number()

log2(X) -> float()

  • X = number()

pow(X, Y) -> float()

  • X = Y = number()

sin(X) -> float()

  • X = number()

sinh(X) -> float()

  • X = number()

sqrt(X) -> float()

  • X = number()

tan(X) -> float()

  • X = number()

tanh(X) -> float()

  • X = number()

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

erf(X) -> float()

  • X = number()

Returns the error function of X, where:

erf(X) = 2/sqrt(pi)*integral from 0 to X of exp(-t*t) dt.

erfc(X) -> float()

  • X = number()

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

pi() -> float()

A useful number.

Limitations

As these are the C library, the same limitations apply.