The function f(n)
to calculate the sum.
The upper limit for the sum.
The lower limit for the sum. Defaults to 0
. The order is reversed because a
is optional. Deal with it.
The amount of iterations to perform. Defaults to DEFAULT_ITERATIONS - 10.
The calculated sum of f(n)
, as a Decimal.
Approximates the sum of
f(n)
froma
tob
using a midpoint riemann sum. See calculateSum for a more general function.