#9630: Python ints should have a conversion to Maxima
-------------------------+--------------------------------------------------
Reporter: kcrisman | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: 4.5.3
Component: symbolics | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-------------------------+--------------------------------------------------
Comment(by nbruin):
the particular error that arises here is raised in
sage/calculus/calculus.pyc line 501:
{{{
sum = "'sum(%s, %s, %s, %s)" % tuple([repr(expr._maxima_()) for expr in
(expression, v, a, b)])
}}}
One could fix this one by first coercing a,b into SR. As an example:
{{{
sage: SR(int(1))._maxima_()
1
}}}
This code looks rather convoluted to me anyway: Convert to maxima, take
string representative, paste together and then simplify? Shouldn't the
whole sum first be turned into a pynac sum expression, the whole thing
converted to maxima, simplified, and then cast back?
{{{
sage: var("x,a,b") # this is just because I don't
know
sage: SUM=sum(sin(x^2),x,a,b).operator() # where this is defined
sage: SR(SUM(x,x,1,int(10))._maxima_().simplify_sum())
55
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9630#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.