Which programming language or a library can process Infinite Series?

后端 未结 13 1413
情书的邮戳
情书的邮戳 2021-02-03 23:46

Which programming language or a library is able to process infinite series (like geometric or harmonic)? It perhaps must have a database of some well-known series and automatica

13条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-03 23:59

    Just install sympy on your computer. Then do the following code:

    from sympy.abc import i, k, m, n, x
    from sympy import Sum, factorial, oo, IndexedBase, Function
    Sum((-1)**k/(2*k+1), (k, 0, oo)).doit()
    

    Result will be: pi/4

提交回复
热议问题