Tool to evaluate the value of the error function noted erf() or its complementary erfc(); special functions used in probability, statistics or physics.

Error Function - dCode

Tag(s) : Functions

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

The error function (sometimes called *Gaussian error function*) is denoted $ \operatorname{erf} $ and is defined by the formula $$ \operatorname{erf}(x)= \frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2} \, \mathrm{d}t $$

The error function returns a result between -1 and 1.

__Example:__ $ \operatorname{erf}(0) = 0 $, $ \operatorname{erf}(-\infty) = -1 $, $ \operatorname{erf}(+\infty) = 1 $

The `erf` function is an odd function

The complementary error function is defined by $$ \operatorname{erfc}(x) = 1-\operatorname{erf}(x) $$

__Example:__ $ \operatorname{erf}(x) + \operatorname{erfc}(x) = 1 $

The inverse error function is defined by the inverse (reciprocal) function $$ \operatorname{erf}^{-1}(\operatorname{erf}(x)) = x $$

__Example:__ Knowing $ \operatorname{erf}(x) = 0.1 $ then it is possible to find $ x = \operatorname{erf}^{-1}(0.1) \approx 0.0088625 $

The expansion in integer series of 'erf ()' allow a fast computation (with approximations) by the formula: $$ \operatorname{erf}(x)= \frac{2}{\sqrt{\pi}} \sum_{n=0}^{\infty} (-1)^{n} \frac{x^{2n+1}}{n!(2n+1)} = \frac{2}{\sqrt{\pi}} \left( x - \frac{z^3}{3} + \frac{z^5}{10} - \frac{z^7}{42} + \frac{z^9}{216} + \cdots \right) $$

The inverse function has a series expansion: $$ \operatorname{erf}^{-1}(x) = \frac{1}{2} \sqrt{\pi} \left( x + \frac{\pi}{12}x^3 + \frac{7\pi^2}{480} x^5 + \frac{127\pi^3}{40320} x^7 + \frac{4369\pi^4}{5806080} x^9 + O(x^{10}) \right) $$

The image of a negative value $ -z $ is the opposite of the image of the positive value: $ \operatorname{erf}(-z) = -\operatorname{erf}(z) $ (symmetry)

The derivative of the error function is $$ \frac{d}{dz} \operatorname{erf}(z) = \frac{2}{\sqrt{\pi}}e^{-z^2} $$

The integral of the error function is $$ \int \operatorname{erf}(x)\, dx = \frac{e^{-x^2}}{\sqrt{\pi}}+x \operatorname{erf}(x) + c $$

The error function is bounded between -1 and 1, that is, $ -1 \leq \operatorname{erf}(x) \leq 1 $ for all real $ x $.

dCode retains ownership of the "Error Function" source code. Except explicit open source licence (indicated Creative Commons / free), the "Error Function" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Error Function" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Error Function" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!

Reminder : dCode is free to use.

The copy-paste of the page "Error Function" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!

Exporting results as a .csv or .txt file is free by clicking on the *export* icon

Cite as source (bibliography):

*Error Function* on dCode.fr [online website], retrieved on 2024-06-15,

error,function,erf,erfc,gauss

https://www.dcode.fr/error-function

© 2024 dCode — El 'kit de herramientas' definitivo para resolver todos los juegos/acertijos/geocaching/CTF.

Feedback