Function Math.Sum Series(IEnumerable<Double>, Int 32, Double) Method
Adds up the terms of a series.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
The sum of the elements in terms up to maxTerms terms or the first term within a fraction relativeTolerance of the sum.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static double SumSeries(
IEnumerable<double> terms,
int maxTerms,
double relativeTolerance = 2.22044604925031E-16
)
Parameters
- terms IEnumerable<Double>
- A sequence of real numbers.
- maxTerms Int32
- The maximum number of terms to include in the summation.
- relativeTolerance Double (Optional)
- The relative size of the smallest terms to include in the summation.
Return Value
DoubleThe sum of the elements in terms up to maxTerms terms or the first term within a fraction relativeTolerance of the sum.