erfcInverse

Evaluates the real inverse complementary error function erfc1(x).

Synopsis

erfcInverse (x)

Required Arguments

float x (Input)
Point at which the inverse complementary error function is to be evaluated. The argument x must be in the range 0 < x < 2.

Return Value

The value of the inverse complementary error function.

Description

The inverse complementary error function y=erfc1(x) is such that x=erfc(y) where

erfc(y)=2πyet2dt
../../_images/Fig9-4.png

Figure 9.11 — Plot of erfc1(x)

Example

Evaluate the inverse complementary error function at x=1/2.

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

x = 0.5
ans = erfcInverse(x)
print("Inverse erfc(%f) = %f" % (x, ans))

Output

Inverse erfc(0.500000) = 0.476936

Alert Errors

IMSL_LARGE_ARG_UNDERFLOW

The argument x must not be so large that the result underflows. Very approximately, x should be less than

2ε/(4π)

where ɛ is the machine precision.

Warning Errors

IMSL_LARGE_ARG_WARN |x| should be less than 1/ε where ɛ is the machine precision, to prevent the answer from being less accurate than half precision.

Fatal Errors

IMSL_ERF_ALGORITHM The algorithm failed to converge.
IMSL_SMALL_ARG_OVERFLOW The computation of ex2erfc x must not overflow.
IMSL_REAL_OUT_OF_RANGE The function is defined only for 0 < x < 2.