intdeiini

I = integral of f(x) over (a,infinity), f(x) has not oscillatory factor.

void
intdeiini
(
Real
)
(
size_t lenaw
,
Real tiny
,
Real eps
,
Real* aw
)

Parameters

lenaw size_t

length of aw

tiny Real

minimum value that 1/tiny does not overflow

eps Real

relative error requested

aw Real*

points and weights of the quadrature formula, aw[0...lenaw-1]

lenaw size_t

8000;

tiny Real

1.0e-307; function f(x) needs to be analytic over (a,infinity). relative error eps is relative error requested excluding cancellation of significant digits. i.e. eps means : (absolute error) / (integral_a^infinity |f(x)| dx). eps does not mean : (absolute error) / I. error message err >= 0 : normal termination. err < 0 : abnormal termination. i.e. convergent error is detected : 1. f(x) or (d/dx)^n f(x) has discontinuous points or sharp peaks over (a,infinity). you must divide the interval (a,infinity) at this points. 2. relative error of f(x) is greater than eps. 3. f(x) has oscillatory factor and decay of f(x) is very slow as x -> infinity. </pre>

Examples

auto aw = new real[8000];
intdeiini(aw.length, tiny, eps, aw.ptr);  // initialization of aw
...
intdei(f, a, aw.ptr, &i, &err);

Meta