math (stdlib v6.2)
View SourceMathematical functions.
This module provides an interface to a number of mathematical functions.
For details about what each function does, see the the C library documentation
on your system. On Unix systems the easiest way it to run man sin. On
Windows you should check the Math and floating-point support
documentation.
Limitations
As these are the C library, the same limitations apply.
Summary
Functions
Inverse cosine of X, return value is in radians.
Inverse hyperbolic cosine of X.
Inverse sine of X, return value is in radians.
Inverse hyperbolic sine of X.
Inverse 2-argument tangent of X, return value is in radians.
Inverse tangent of X, return value is in radians.
Inverse hyperbolic tangent of X.
The ceiling of X.
The cosine of X in radians.
The hyperbolic cosine of X.
Returns the error function (or Gauss error function) of X.
Raise e by X, that is eˣ.
The floor of X.
Returns X modulus Y.
The base-2 logarithm of X.
The base-10 logarithm of X.
The natural (base-e) logarithm of X.
Ratio of the circumference of a circle to its diameter.
Raise X by N, that is xⁿ.
Sine of X in radians.
Hyperbolic sine of X.
Square root of X.
Tangent of X in radians.
Hyperbolic tangent of X.
Ratio of the circumference of a circle to its radius.
Functions
Inverse cosine of X, return value is in radians.
Inverse hyperbolic cosine of X.
Inverse sine of X, return value is in radians.
Inverse hyperbolic sine of X.
Inverse 2-argument tangent of X, return value is in radians.
Inverse tangent of X, return value is in radians.
Inverse hyperbolic tangent of X.
The ceiling of X.
The cosine of X in radians.
The hyperbolic cosine of X.
Returns the error function (or Gauss error function) of X.
Where:
erf(X) = 2/sqrt(pi)*integral from 0 to X of exp(-t*t) dt.
erfc(X) returns 1.0 - erf(X), computed by methods
that avoid cancellation for large X.
Raise e by X, that is eˣ.
Where e is the base of the natural logarithm.
The floor of X.
Returns X modulus Y.
The base-2 logarithm of X.
The base-10 logarithm of X.
The natural (base-e) logarithm of X.
-spec pi() -> float().
Ratio of the circumference of a circle to its diameter.
Floating point approximation of mathematical constant pi.
Raise X by N, that is xⁿ.
Sine of X in radians.
Hyperbolic sine of X.
Square root of X.
Tangent of X in radians.
Hyperbolic tangent of X.
-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().