Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Computes the sum

.. math :: S = \sum_{k=a}^b f(k)

where `(a, b)` = *interval*, and where `a = -\infty` and/or
`b = \infty` are allowed, or more generally

.. math :: S = \sum_{k_1=a_1}^{b_1} \cdots
               \sum_{k_n=a_n}^{b_n} f(k_1,\ldots,k_n)
(more...)

src/s/y/sympy-HEAD/sympy/core/evalf.py   sympy(Download)
 
import sympy.mpmath.libmp as libmp
from sympy.mpmath import make_mpc, make_mpf, mp, mpc, mpf, nsum, quadts, quadosc
from sympy.mpmath import inf as mpmath_inf
from sympy.mpmath.libmp import (from_int, from_man_exp, from_rational, fhalf,
        try:
            mp.prec = prec
            v = nsum(summand, [0, mpmath_inf], method='richardson')
        finally:
            mp.prec = orig

src/s/y/sympy-polys-HEAD/sympy/core/evalf.py   sympy-polys(Download)
        mpf_atan, mpf_atan2, mpf_e, mpf_exp, from_man_exp, from_int)
from sympy.mpmath.libmp.backend import MPZ
from sympy.mpmath import nsum
from sympy.mpmath import inf as mpmath_inf
 
        try:
            mp.prec = prec
            v = nsum(summand, [0, mpmath_inf], method='richardson')
        finally:
            mp.prec = orig