#8734: make sage variables unique in maxima
-------------------------------------+-------------------------------------
Reporter: jason | Owner: jason
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.2
Component: interfaces | Resolution:
Keywords: | Merged in:
Authors: Jason Grout, Ralf | Reviewers: Volker Braun
Stephan | Work issues:
Report Upstream: N/A | Commit:
Branch: | be9367f966fc76ba6028b57ab4317530cfd1205e
u/rws/ticket/8734-1 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by rws):
Concerning the remaining doctests in `interfaces/maxima_abstract.py` I am
at a loss at what to do. For example this
{{{
sage: x,y = var('x,y'); f = maxima.function('x','sin(x)')
sage: type(f)
<class 'sage.interfaces.maxima.MaximaElementFunction'>
sage: g=maxima.cos(x)
sage: type(g)
<class 'sage.interfaces.maxima.MaximaElement'>
sage: f+g
cos(_SAGE_VAR_x)+sin(x)
sage: (f+g)(2)
cos(_SAGE_VAR_x)+sin(2)
}}}
shows that while the `MaximaElementFunction f` has the variable `x` which
is associated with `_SAGE_VAR_x` in Maxima (and calling the function works
as expected), the `MaximaElement g` shows `_SAGE_VAR_x` which has of
course no Maxima pendant (and calling the function bombs). Naively both
should behave identically.
{{{
sage: h=SR(maxima.cos(x))
sage: h
cos(x)
sage: h(2)
cos(2)
sage: f+h
cos(_SAGE_VAR_x)+sin(x)
sage: (f+h)(2)
cos(_SAGE_VAR_x)+sin(2)
}}}
Moreover, if `g` gets converted to `SR` it behaves fine but when converted
to `type(f)` by using it as rhs it gets `_SAGE_VAR_x` as parameter. What
is the next step?
--
Ticket URL: <http://trac.sagemath.org/ticket/8734#comment:26>
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 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/sage-trac.
For more options, visit https://groups.google.com/d/optout.