IMath.SeriesSum

Syntax

SeriesSum(X: Double; Power: Double; Step: Double; Coefficients: Array): Double;

Parameters

X is the value of the power series variable.

Power is the index of power of X for the first member of the power series.

Step is the step, by which the index of the Power power is increased for each next member of the power series.

Coefficients is the set of factors by the corresponding powers of X.

Description

The SeriesSum method returns the sum of the power series.

Comments

The sum of the power series is calculated by the formula:

Example

To execute the example, add a link to the MathFin system assembly.

Sub UserProc;
Var
    a: Array[
1..5Of Double;
    d: Double;
Begin
    a[
1] := 2.1;
    a[
2] := 6.3;
    a[
3] := 3.2;
    a[
4] := 8.8;
    a[
5] := 4.5;
    d := Math.SeriesSum(
1011, a);
    Debug.WriteLine(d);
End Sub UserProc;

After executing the example the console window displays the sum of the power series.

See also:

IMath