viewed 2155 times and licensed 113 times
The Error Function.
View other versions (5)
Contents  |
|
Interface
#include <codecogs/maths/special/errorfn.h>
using namespace Maths::Special;
| double | errorFn (double x) The Error Function. |
Function Documentation
The Error Functionis defined by equation
and has the shape
Warning:
- This approximation of erf is only valid between -3 and 3
References:
- Eric W. Weisstein. "Erf." From MathWorld--A Wolfram Web Resource
- http://mathworld.wolfram.com/Erf.html
Example 1:
#include <codecogs/maths/special/errorfn.h>
#include <stdio.h>
using namespace Maths::Special;
int main( )
{
double x = 0.5;
printf("\n errorFn(%f) = %f", x, errorFn(x));
return getchar();
}
Output:
errorFn(0.500000) = 0.520500
Parameters:
| x | the upper limit of the integral (-3<x<3) |
Returns:
- the value of the Error Function evaluated at the given abscissa
Authors:
- Vince Cole (March 2005)
Page Comments
You must login to leave a messge
Last Modified: 25 Oct 09 @ 15:01 Page Rendered: 2010-03-10 21:36:06