erf - This computes the value obtained in the error function for a specific position.
erf (argument)
The error function is a mathematical special-function that is equivalent to the integral of a gaussian. It is non-elementary and it is called error function because it cannot be defined with basis functions. It is mostly used in probability and statistics. The area under the curve (the integral) equals one because the gaussian functions are normalized. For that reason, it is defined in the first and third quadrant only, meaning that if x<0, y<0 and if x>0, y>0.
One can use this function with integers: test(q(res=<{erf(4);}>.),q(res=1.)); With floats: test(q(res=<{erf(1.2);}>.),q(res=.910314.)); With another variable: test(q(res=<{ %include "/includes/extenso.sn"; a=3; erf(a); }>.), q(res=.999978.)); With a trigonometric function: test(q(res=<{ %include "/includes/extenso.sn"; a=cos(0); erf(a); }>.), q(res=.842701.)); With the limits: test(q(res=<{ %include "/includes/extenso.sn"; erf(INF); }>.), q(res=1.)); With negative numbers: test(q(res=<{erf(-2.3);}>.),q(res=-.998857.)); With an array: test(q(res=<{erf(1,-2.3,4);}>.),q(res=\[.842701,-.998857,1\].));
Written by Caroline Laplante, <claplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com