suivant: Complementary error function: erfc
monter: Real numbers
précédent: n-th root : root
Table des matières
Index
Error function : erf
erf takes as argument a number a.
erf returns the floating point value of the error function at x = a,
where the error function is defined by :
erf(
x) =
![$\displaystyle {\frac{{2}}{{\sqrt{\pi}}}}$](img82.png)
e-t2dt
The normalization is choosen so that:
erf(+
![$\displaystyle \infty$](img84.png)
) = 1, erf(-
![$\displaystyle \infty$](img84.png)
) = - 1
since :
e-t2dt =
Input :
erf(1)
Output :
0.84270079295
Input :
erf(1/(sqrt(2)))*1/2+0.5
Output :
0.841344746069
Remark
The relation between erf and normal_cdf is :
![\begin{displaymath}\mbox{\tt normal\_cdf}(x)=\frac{1}{2}+\frac{1}{2}\*\mbox{\tt
erf}(\frac{x}{\sqrt{2}}) \end{displaymath}](img89.png)
Indeed, making the change of variable
t = u*
in
![\begin{displaymath}\mbox{normal\_cdf}(x)=\frac{1}{2}+\frac{1}{\sqrt{2\pi}}\int_0^{x}e^{-t^2/2}dt\end{displaymath}](img92.png)
gives :
![\begin{displaymath}\mbox{normal\_cdf}(x)=\frac{1}{2}+\frac{1}{\sqrt{\pi}}\int_0^...
...-u^2}du=\frac{1}{2}+\frac{1}{2}\*\mbox{erf}(\frac{x}{\sqrt{2}})\end{displaymath}](img95.png)
Check :
normal_cdf(1)=0.841344746069
giac documentation written by Renée De Graeve and Bernard Parisse