Sum of a series: Difference between revisions
Content added Content deleted
Line 1,237:
{{FormulaeEntry|page=https://formulae.org/?script=examples/Sum_of_a_series}}
'''Solution'''
In the following function, the first parameter is the series is provided as a lambda expression. The second parameter is the number of terms to calculate
[[File:Fōrmulæ - Sum of a series 01.png]]
'''Test case'''
The exact value (of the sum) is:
[[File:Fōrmulæ - Sum of a series 02.png]]
(click to enlarge)
[[File:Fōrmulæ - Sum of a series 03.png|750px||link=https://static.wikiforge.net/rosettacodewikitide/0/0f/F%C5%8Drmul%C3%A6_-_Sum_of_a_series_03.png]]
The approximate value is:
[[File:Fōrmulæ - Sum of a series 04.png]]
[[File:Fōrmulæ - Sum of a series 05.png]]
While the (approximate) value of π<sup>2</sup>/6 is:
[[File:Fōrmulæ - Sum of a series 06.png]]
[[File:Fōrmulæ - Sum of a series 07.png]]
=={{header|GAP}}==
|