functionerfInv

Inverse error function: u = erf(erfInv(u))

Extends from Modelica.Icons.Function (Icon for functions).

Information

Syntax

Special.erfInv(u);

Description

This function computes the inverse of the error function erf(u) = 2/sqrt(pi)*Integral_0_u exp(-t^2)*dt numerically with a relative precision of about 1e-15. Therefore, u = erf(erfInv(u)). Input argument u must be in the range (otherwise an assertion is raised):

-1 ≤ u ≤ 1

If u = 1, the function returns Modelica.Constants.inf.
If u = -1, the function returns -Modelica.Constants.inf
The implementation utilizes the formulation of the Boost library (erf_inv.hpp, developed by John Maddock).
Plot of the function:

For more details, see Wikipedia.

Example

erfInv(0)            // = 0
erfInv(0.5)          // = 0.4769362762044699
erfInv(0.999999)     // = 3.458910737275499
erfInv(0.9999999999) // = 4.572824958544925

See also

erf, erfc, erfcInv.

Inputs

TypeNameDefaultDescription
RealuInput argument in the range -1 <= u <= 1

Outputs

TypeNameDefaultDescription
Realy= inverse of error function

Revisions

Date Description
June 22, 2015
DLR logo Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
DLR Institute of System Dynamics and Control