.TH math 3erl "stdlib 1.18.1" "Ericsson AB" "Erlang Module Definition" .SH NAME math \- Mathematical Functions .SH DESCRIPTION .LP This module provides an interface to a number of mathematical functions\&. .LP .RS -4 .B Note: .RE Not all functions are implemented on all platforms\&. In particular, the \fIerf/1\fR\& and \fIerfc/1\fR\& functions are not implemented on Windows\&. .SH EXPORTS .LP .nf .B pi() -> float() .br .fi .br .RS .LP A useful number\&. .RE .LP .B sin(X) .br .B cos(X) .br .B tan(X) .br .B asin(X) .br .B acos(X) .br .B atan(X) .br .B atan2(Y, X) .br .B sinh(X) .br .B cosh(X) .br .B tanh(X) .br .B asinh(X) .br .B acosh(X) .br .B atanh(X) .br .B exp(X) .br .B log(X) .br .B log10(X) .br .B pow(X, Y) .br .B sqrt(X) .br .RS .LP Types: .RS 3 X = Y = number() .br .RE .RE .RS .LP A collection of math functions which return floats\&. Arguments are numbers\&. .RE .LP .B erf(X) -> float() .br .RS .LP Types: .RS 3 X = number() .br .RE .RE .RS .LP Returns the error function of \fIX\fR\&, where .LP .nf erf(X) = 2/sqrt(pi)*integral from 0 to X of exp(-t*t) dt. .fi .RE .LP .B erfc(X) -> float() .br .RS .LP Types: .RS 3 X = number() .br .RE .RE .RS .LP \fIerfc(X)\fR\& returns \fI1\&.0 - erf(X)\fR\&, computed by methods that avoid cancellation for large \fIX\fR\&\&. .RE .SH "BUGS" .LP As these are the C library, the bugs are the same\&.