#10750: Fix solve so that additional args are properly handled
-------------------------------+--------------------------------------------
   Reporter:  kcrisman         |          Owner:  burcin                       
       Type:  defect           |         Status:  needs_work                   
   Priority:  major            |      Milestone:                               
  Component:  symbolics        |       Keywords:  solve, maxima, Maxima, sd35.5
Work_issues:  error in Maxima  |       Upstream:  N/A                          
   Reviewer:  Paul Zimmermann  |         Author:  John Palmieri                
     Merged:                   |   Dependencies:                               
-------------------------------+--------------------------------------------
Changes (by zimmerma):

  * keywords:  solve, maxima, Maxima => solve, maxima, Maxima, sd35.5
  * reviewer:  => Paul Zimmermann
  * status:  needs_review => needs_work
  * work_issues:  => error in Maxima


Comment:

 after importing the patch on top of sage-4.8.apha6, I get:
 {{{
 Loading Sage library. Current Mercurial branch is: 10750
 sage: s=list(var('s_%d' % i) for i in range(3));
 sage: var('x y z');
 sage: print solve([],s_0,s_1,s_2)
 [
 [s_0 == c1, s_1 == c2, s_2 == c3]
 ]
 sage: print solve([z==z],s_0,s_1,s_2)
 ---------------------------------------------------------------------------
 RuntimeError                              Traceback (most recent call
 last)

 /localdisk/tmp/sage-4.8.alpha6/<ipython console> in <module>()

 /localdisk/tmp/sage-4.8.alpha6/local/lib/python2.6/site-
 packages/sage/symbolic/relation.pyc in solve(f, *args, **kwds)
     736                 raise
     737
 --> 738     if len(s)==0: # if Maxima's solve gave no solutions, try its
 to_poly_solve
     739         try:
     740             s = m.to_poly_solve(variables)

 /localdisk/tmp/sage-4.8.alpha6/local/lib/python2.6/site-
 packages/sage/interfaces/maxima_abstract.pyc in __len__(self)
    1618         """
    1619         P = self._check_valid()
 -> 1620         return int(P.eval('length(%s)'%self.name()))
    1621
    1622     def dot(self, other):

 /localdisk/tmp/sage-4.8.alpha6/local/lib/python2.6/site-
 packages/sage/interfaces/maxima_lib.pyc in _eval_line(self, line, locals,
 reformat, **kwds)
     418                     statement = line[:ind_semi]
     419                     line = line[ind_semi+1:]
 --> 420                 if statement: result = ((result + '\n') if result
 else '') + max_to_string(maxima_eval("#$%s$"%statement))
     421             else:
     422                 statement = line[:ind_dollar]

 /localdisk/tmp/sage-4.8.alpha6/local/lib/python2.6/site-
 packages/sage/libs/ecl.so in sage.libs.ecl.EclObject.__call__
 (sage/libs/ecl.c:4732)()

 /localdisk/tmp/sage-4.8.alpha6/local/lib/python2.6/site-
 packages/sage/libs/ecl.so in sage.libs.ecl.ecl_safe_apply
 (sage/libs/ecl.c:2838)()

 RuntimeError: ECL says: Error executing code in Maxima: length: argument
 cannot be a symbol; found all
 }}}
 Paul

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