Goto main content

erf

This computes the value obtained in the error function for a specific position.

ERF

NAME

erf - This computes the value obtained in the error function for a specific position.

SYNOPSIS

erf (number)

DESCRIPTION

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.

PARAMETERS

number
Specifies the number (float) used as argument for the erf function.

RETURN

The value of the error function.

EXAMPLES

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\].));

SEE ALSO

AUTHOR

Written by Caroline Laplante, <claplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.