math

Mathematical Functions

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

Note!

Not all functions are implemented on all platforms. In particular, the erf/1 and erfc/1 functions are not implemented on Windows.

Functions


pi() -> float()

A useful number.

sin(X) -> float()

  • X = number()

cos(X) -> float()

  • X = number()

tan(X) -> float()

  • X = number()

asin(X) -> float()

  • X = number()

acos(X) -> float()

  • X = number()

atan(X) -> float()

  • X = number()

atan2(Y, X) -> float()

  • Y = X = number()

sinh(X) -> float()

  • X = number()

cosh(X) -> float()

  • X = number()

tanh(X) -> float()

  • X = number()

asinh(X) -> float()

  • X = number()

acosh(X) -> float()

  • X = number()

atanh(X) -> float()

  • X = number()

exp(X) -> float()

  • X = number()

log(X) -> float()

  • X = number()

log10(X) -> float()

  • X = number()

pow(X, Y) -> float()

  • X = Y = number()

sqrt(X) -> float()

  • X = number()

A collection of math functions which 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.

Bugs

As these are the C library, the bugs are the same.