#10169: Operands and Operator of symbolic expressions
-------------------------+--------------------------------------------------
   Reporter:  SimonKing  |       Owner:  burcin                     
       Type:  defect     |      Status:  new                        
   Priority:  major      |   Milestone:                             
  Component:  symbolics  |    Keywords:  operator operands symbolics
     Author:             |    Upstream:  N/A                        
   Reviewer:             |      Merged:                             
Work_issues:             |  
-------------------------+--------------------------------------------------
 I think that for all symbolic expression {{{s}}} should hold
 {{{
 sage: s == s.operator()(*s.operands())
 }}}

 That currently does not work, for two reasons.

 1. There may be no operator at all:
 {{{
 sage: print x.operator()
 None
 sage: x.operands()
 []
 }}}
 I believe there should instead be an identity operator.

 2. The list of operands may be longer than what the operator accepts:
 {{{
 sage: s = 0.001*x^2+0.01*x+0.1*sin(1.01*x)+1
 sage: s.operands()
 [0.00100000000000000*x^2, 0.0100000000000000*x,
 0.100000000000000*sin(1.01000000000000*x), 1]
 sage: s.operator()(*s.operands())
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /home/king/<ipython console> in <module>()

 TypeError: op_add expected 2 arguments, got 4
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10169>
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