Important: The information in this document is obsolete and should not be used for new development.
erfc
You can use theerfc
function to perform the complementary error function.
double_t erfc (double_t x);
x
- Any floating-point number.
DESCRIPTION
Theerfc
function computes the complementary error of its argument. This function is antisymmetric.
For large positive numbers (around 10), use the function call
erfc(x)
instead of the expression1.0 - erf(x)
. The callerfc(x)
produces a more exact result.EXCEPTIONS
When x is finite and nonzero, either the result of 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-36 shows the results when the argument to theerfc
function is a zero, a NaN, or an Infinity.
Special cases for the erfc
functionOperation Result Exceptions raised +1 None +1 None NaN None[60] +0 None +2 None EXAMPLES
z = erfc(-INFINITY); /* z = 1 - erf() = 1 - -1 = +2.0 */ z = erfc(0.0); /* z = 1 - erf(0) = 1 - 0 = 1.0 */
[60] If the NaN is a signaling NaN, the invalid exception is raised.