erfInverse¶
Evaluates the real inverse error function \(erf^{-1}(x)\).
Synopsis¶
erfInverse (x)
Required Arguments¶
- float
x
(Input) - Point at which the inverse error function is to be evaluated. It must be between −1 and 1.
Return Value¶
The value of the inverse error function \(erf^{-1}(x)\).
Description¶
The inverse error function \(erf^{-1}(x)\) is such that \(x=erf(y)\), where
\[\mathrm{erf}(y) = \frac{2}{\sqrt{\pi}} \int_0^y e^{-t^2} dt\]
The inverse error function is defined only for \(-1<x<1\).
Figure 9.10 — Plot of \(erf^{-1}(x)\)
Example¶
Evaluate the inverse error function at \(x=1/2\).
from __future__ import print_function
from numpy import *
from pyimsl.math.erfInverse import erfInverse
x = 0.5
ans = erfInverse(x)
print("Inverse erf(%f) = %f" % (x, ans))
Output¶
Inverse erf(0.500000) = 0.476936
Warning Errors¶
IMSL_LARGE_ABS_ARG_WARN |
The answer is less accurate than half precision because \(|x|\) large. |
Fatal Errors¶
IMSL_REAL_OUT_OF_RANGE |
The inverse error function is defined
only for −1 < x < 1. |