Important: The information in this document is obsolete and should not be used for new development.
erf
You can use theerf
function to perform the error function.
double_t erf (double_t x);
x
- Any floating-point number.
DESCRIPTION
Theerf
function computes the error function of its argument. This function is antisymmetric.
EXCEPTIONS
When x is finite and nonzero, either the result of erf(x) is exact or it raises one of the following exceptions:
- inexact (if the result must be rounded or an underflow occurs)
- underflow (if the result is inexact and must be represented as a denormalized number or 0)
SPECIAL CASES
Table 10-35 shows the results when the argument to theerf
function is a zero, a NaN, or an Infinity.
Special cases for the erf
functionOperation Result Exceptions raised +0 None None NaN None[59] +1 None -1 None EXAMPLES
z = erf(1.0); /* z 0.842701. The inexact exception is raised. */ z = erf(-1.0); /* z -0.842701. The inexact exception is raised. */
[59] If the NaN is a signaling NaN, the invalid exception is raised.