.Modelica.Math.Special.erf

Information

Syntax

Special.erf(u);

Description

This function computes the error function erf(u) = 2/sqrt(pi)*Integral_0_u exp(-t^2)*dt numerically with a relative precision of about 1e-15. The implementation utilizes the formulation of the Boost library (53-bit implementation of erf.hpp, developed by John Maddock). Plot of the function:

For more details, see Wikipedia.

Example

  erf(0)    // = 0
  erf(10)   // = 1
  erf(0.5)  // = 0.520499877813047

See also

erfc, erfInv, erfcInv.

Interface

function erf
  extends Modelica.Icons.Function;
  input Real u "Input argument";
  output Real y "= 2/sqrt(pi)*Integral_0_u exp(-t^2)*dt";
end erf;

Revisions

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

Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39