Calculating Pi in 5 lines of Pythonasksiri.us 1 pointswagasaurus-rex1 year ago2 commentsSaveHideCopy link On HNComments−westurner1yInfinite series can't really be calculated to completion using a computer,The sum of an infinite divergent series cannot be calculated with or without a computer.The sum of an infinite convergent series can be calculated with: 1/(a-r) Sequence > Limits and convergence: https://en.wikipedia.org/wiki/Sequence#Limits_and_convergenc...Limit of a sequence: https://en.wikipedia.org/wiki/Limit_of_a_sequenceSymPy docs > Limits of Sequences: https://docs.sympy.org/latest/modules/series/limitseq.htmlProvides methods to compute limit of terms having sequences at infinity.Madhava-Leibniz formula for π: https://en.wikipedia.org/wiki/Leibniz_formula_for_%CF%80−chrism2381yAnd how thousands of lines of C, below, to actually get the work done?
Comments
The sum of an infinite divergent series cannot be calculated with or without a computer.
The sum of an infinite convergent series can be calculated with:
Sequence > Limits and convergence: https://en.wikipedia.org/wiki/Sequence#Limits_and_convergenc...Limit of a sequence: https://en.wikipedia.org/wiki/Limit_of_a_sequence
SymPy docs > Limits of Sequences: https://docs.sympy.org/latest/modules/series/limitseq.html
Madhava-Leibniz formula for π: https://en.wikipedia.org/wiki/Leibniz_formula_for_%CF%80
And how thousands of lines of C, below, to actually get the work done?