Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3965 by [email protected]: sum of chebyshev polys fails to evaluate
http://code.google.com/p/sympy/issues/detail?id=3965

In isympy:


In [1]: var("i")
Out[1]: i

In [2]: e = Sum(chebyshevt(i,x), (i, 0, 2))

In [3]: e
Out[3]:
  2
 ___
 ╲
  ╲   chebyshevt(i, x)
  ╱
 ╱
 ‾‾‾
i = 0

In [4]: e.subs(x, 2)
Out[4]:
  2
 ___
 ╲
  ╲   chebyshevt(i, 2)
  ╱
 ╱
 ‾‾‾
i = 0

In [5]: e.subs(x, 2).n()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-b69700d83718> in <module>()
----> 1 e.subs(x, 2).n()

/home/ondrej/repos/sympy/sympy/core/evalf.pyc in evalf(self, n, subs, maxn, chop, strict, quad, verbose)
   1282             options['quad'] = quad
   1283         try:
-> 1284             result = evalf(self, prec + 4, options)
   1285         except NotImplementedError:
   1286             # Fall back to the ordinary evalf

/home/ondrej/repos/sympy/sympy/core/evalf.pyc in evalf(x, prec, options)
   1182     try:
   1183         rf = evalf_table[x.func]
-> 1184         r = rf(x, prec, options)
   1185     except KeyError:
   1186         try:

/home/ondrej/repos/sympy/sympy/core/evalf.pyc in evalf_sum(expr, prec, options)
   1091             m = n = 2**i * prec
   1092             s, err = expr.euler_maclaurin(m=m, n=n, eps=eps,
-> 1093                 eval_integral=False)
   1094             err = err.evalf()
   1095             if err <= eps:

/home/ondrej/repos/sympy/sympy/concrete/summations.pyc in euler_maclaurin(self, m, n, eps, eval_integral)
    389             ga, gb = fpoint(g)
    390             term = C.bernoulli(2*k)/C.factorial(2*k)*(gb - ga)
--> 391 if (eps and term and abs(term.evalf(3)) < eps) or (k > n):
    392                 break
    393             s += term

/home/ondrej/repos/sympy/sympy/core/relational.pyc in __nonzero__(self)
    224
    225     def __nonzero__(self):
--> 226 raise TypeError("symbolic boolean expression has no truth value.")
    227
    228     __bool__ = __nonzero__

TypeError: symbolic boolean expression has no truth value.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to