naginterfaces.library.sum.accelerate

naginterfaces.library.sum.accelerate(seqn, ncall, comm, nterms)[source]

accelerate accelerates the convergence of a given convergent sequence to its limit.

For full information please refer to the NAG Library document for c06ba

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/c06/c06baf.html

Parameters
seqnfloat

The next term of the sequence to be considered.

ncallint

On the first call must be set to . Thereafter must not be changed between calls.

commdict, communication object, modified in place

Communication structure.

On initial entry: need not be set.

ntermsint

The maximum number of terms in the sequence.

Returns
ncallint

The number of terms in the sequence that have been considered.

resultfloat

The estimate of the limit of the sequence. For the first two calls, .

abserrfloat

An estimate of the absolute error in . For the first three calls, is set to a large machine-dependent constant.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

accelerate performs Shanks’ transformation on a given sequence of real values by means of the Epsilon algorithm of Wynn (1956). A (possibly unreliable) estimate of the absolute error is also given.

The function must be called repetitively, once for each new term in the sequence.

References

Shanks, D, 1955, Nonlinear transformations of divergent and slowly convergent sequences, J. Math. Phys. (34), 1–42

Wynn, P, 1956, On a device for computing the transformation, Math. Tables Aids Comput. (10), 91–96