Does anyone have a Sage hold frunction?  Look at the code below
---------------------------------
def LikeSimplify1a(ex1,ex2,ex3,ex4):
     eq1=str(ex1)+"+"+"("+str(ex2)+")"+"+"+"("+str(ex3)+")"+"+"+"("+str
(ex4)+")"
     n1=SR(ex1);n2=SR(ex2);n3=SR(ex3);n4=SR(ex4)
     eq2=maxima.ratsimp(n1+n2+n3+n4)
     return eq1,eq2
----------------------------------------

Input
----------------------------------------
a1=LikeSimplify1a('-2*(-x-2*x^2-x)','-sqrt(12)-x','-2*(4-10)','10');a1
[0];a1[1];#a1[2]
-------------------------------------------------------
Output
-----------------------------------------------------------
  '-2*(-x-2*x^2-x)+(-sqrt(12)-x)+(-2*(4-10))+(10)'
4*x^2+3*x-2*sqrt(3)+22
------------------------------------------------------------
This is in the notebook and is about what I want.  When I use it on my
server the -sqrt(12) becomes -2sqrt(3).  I don't want this.  Can
anyone help me with a hold function that works in a Python script?
Thanx


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to