erfce

Evaluates the exponentially scaled complementary error function.

Synopsis

erfce (x)

Required Arguments

float x (Input)
Argument for which the function value is desired.

Return Value

Exponentially scaled complementary error function value.

Description

Function erfce computes

\[e^{x^2} \mathrm{erfc}(x)\]

where erfc(x) is the complementary error function. See erfc for its definition.

To prevent the answer from underflowing, x must be greater than

\[x_{\min} \simeq - \sqrt{\ln(b/2)}\]

where b = machine(2) is the largest representable floating-point number. For more information, see the description for machine.

Example

In this example, erfce(1.0) is computed and printed.

from __future__ import print_function
from numpy import *
from pyimsl.math.erfce import erfce

x = 1.0
ans = erfce(x)
print(x)
print(ans)
print("erfc(%6.3f) = %6.3f" % (x, ans))

Output

1.0
0.42758357524871826
erfc( 1.000) =  0.428