Module

math

Module Summary

Mathematical functions.

Description

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.

Exports

acos(X) -> float()
acosh(X) -> float()
asin(X) -> float()
asinh(X) -> float()
atan(X) -> float()
atan2(Y, X) -> float()
atanh(X) -> float()
ceil(X) -> float()
OTP 20.0
cos(X) -> float()
cosh(X) -> float()
exp(X) -> float()
floor(X) -> float()
OTP 20.0
fmod(X, Y) -> float()
OTP 20.0
log(X) -> float()
log10(X) -> float()
log2(X) -> float()
OTP 18.0
pow(X, Y) -> float()
sin(X) -> float()
sinh(X) -> float()
sqrt(X) -> float()
tan(X) -> float()
tanh(X) -> float()

Types

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

erf(X) -> float()

Types

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()

Types

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.

© 2010–2021 Ericsson AB
Licensed under the Apache License, Version 2.0.