Inverse error function
erfinv(
returns
the Inverse Error Function evaluated
for each element of x
)x
. For inputs outside the
interval [-1 1]
, erfinv
returns NaN
.
For expressions of the form erfinv(1-x)
,
use the complementary inverse error function erfcinv
instead.
This substitution maintains accuracy. When x
is
close to 1
, then 1 - x
is a
small number and may be rounded down to 0
. Instead,
replace erfinv(1-x)
with erfcinv(x)
.