1996 2011 Ericsson AB, All Rights Reserved The contents of this file are subject to the Erlang Public License, Version 1.1, (the "License"); you may not use this file except in compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Initial Developer of the Original Code is Ericsson AB. math Joe Armstrong Bjarne Däcker 1 Bjarne Däcker 97-01-15 B math.sgml
math Mathematical Functions

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

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

pi() -> float() A useful number

A useful number.

sin(X) cos(X) tan(X) asin(X) acos(X) atan(X) atan2(Y, X) sinh(X) cosh(X) tanh(X) asinh(X) acosh(X) atanh(X) exp(X) log(X) log10(X) pow(X, Y) sqrt(X) Diverse math functions X = Y = number()

A collection of math functions which return floats. Arguments are numbers.

erf(X) -> float() Error function. 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() Another error function 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.