#7377: Symbolic Ring to Maxima via EclObject
-----------------------------------------------------------------------+----
   Reporter:  nbruin                                                   |       
Owner:  nbruin      
       Type:  enhancement                                              |      
Status:  needs_work  
   Priority:  major                                                    |   
Milestone:  sage-feature
  Component:  symbolics                                                |    
Keywords:              
     Author:  Nils Bruin, Jean-Pierre Flori                            |    
Upstream:  N/A         
   Reviewer:  Jean-Pierre Flori, François Bissey, Karl-Dieter Crisman  |      
Merged:              
Work_issues:                                                           |  
-----------------------------------------------------------------------+----

Comment(by nbruin):

 Replying to [comment:68 jpflori]:
 > Maxima transforms log(9!^x) back to log(9)*x before it is passed to
 string function in max_to_string:

 Thanks for locating the error! It's simply that maxima's {{{string}}} (in
 lisp {{{$STRING}}}) does too much work, meaning that max_to_string
 involves a new call to MEVAL. The definition is in {{{suprv1.lisp}}} and
 points to what to do differently. Two definitions in maxima_lib.py need
 adjusting:
 {{{
 maxprint=EclObject("(defun mstring-for-sage (form) (coerce (mstring form)
 'string))").eval()

 def max_to_string(s):
      return maxprint(s).python()[1:-1]
 }}}
 WARNING: the routine maxprint is lisp, not maxima and is presently not run
 under maxima-eval's control, so maxima errors will be poorly reported. If
 converting maxima expressions to strings can trigger errors we need an
 adjusted version of maxima-eval that calls EVAL rather than MEVAL on the
 parameter (to execute lisp code under our replacement of maxima's
 toplevel)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7377#comment:70>
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.

Reply via email to