#6883: [with spkg, needs review] ECL 9.8.4 fails to build in 64-bit mode, OS X
10.5.8
----------------------+-----------------------------------------------------
Reporter: mvngu | Owner: mabshoff
Type: defect | Status: new
Priority: critical | Milestone: sage-4.1.2
Component: packages | Keywords: os x ecl cvs
Reviewer: | Author: David Kirkby, Minh Van Nguyen
Merged: |
----------------------+-----------------------------------------------------
Changes (by newvalueoldvalue):
* author: David Kirkby, Minh Nguyen => David Kirkby, Minh Van Nguyen
Comment:
Replying to [comment:8 jhpalmieri]:
> Is this a serious issue, or just something to do with the new version of
maxima?
It's an issue with data representation. On the surface you see nothing
wrong, even on sage.math:
{{{
sage: v = maxima('create_list(i*x^i,i,0,5)')
sage: L = list(v)
sage: [e for e in L]
[0, x, 2*x^2, 3*x^3, 4*x^4, 5*x^5]
sage: L
[0, x, 2*x^2, 3*x^3, 4*x^4, 5*x^5]
}}}
Each member of the list `L` is a `MaximaElement` object. So we should use
the method `_sage_()` to convert these objects to Sage objects:
{{{
sage: [type(e) for e in L]
[<class 'sage.interfaces.maxima.MaximaElement'>,
<class 'sage.interfaces.maxima.MaximaElement'>,
<class 'sage.interfaces.maxima.MaximaElement'>,
<class 'sage.interfaces.maxima.MaximaElement'>,
<class 'sage.interfaces.maxima.MaximaElement'>,
<class 'sage.interfaces.maxima.MaximaElement'>]
sage: [e._sage_() for e in L]
[0, x, 2*x^2, 3*x^3, 4*x^4, 5*x^5]
}}}
Displaying `MaximaElement` objects as is can be dangerous because
sometimes they have escape sequences, which result in unexpected
behaviours:
{{{
sage: [str(e) for e in L]
[' 0',
' x',
' 2\r\n
2 x',
' 3\r\n
3 x',
' 4\r\n
4 x',
' 5\r\n
5 x']
sage: [latex(e) for e in L]
[0, x, 2\,x^2, 3\,x^3, 4\,x^4, 5\,x^5]
}}}
The patch `trac_6883-proper-display.patch` should fix the doctest problem
on 64-bit OS X 10.5.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6883#comment:9>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---