Perform integral on specified function in the given data range. It can be used for improper integral like infinite integral.
double ocmath_function_integral( double a, double b, EVALUATFUNC func, LPVOID pPara, double precision = 10e-8 )
Return the integral value
EX1
double sin_a(double x, LPVOID pa) { return sin(*(double*)pa*x); } void ocmath_function_integral_ex1() { double a = PI; double dd = ocmath_function_integral(0, 1, sin_a, (LPVOID)&a); printf ("%lf\n", dd); }
origin.h