I just tried this in isympy and as long as you specify both real and positive, it seems to work:
In [1]: r = Symbol('r', real=True, positive=True) In [2]: sqrt(r*r) Out[2]: r In [3]: r = Symbol('r', real=True) In [4]: sqrt(r*r) Out[4]: │r│ On Thu, Aug 11, 2011 at 6:01 PM, Alan Bromborsky <abro...@verizon.net>wrote: > I have a symbol r which should be assumed real and greater than zero. What > I want is for sqrt(r*r) to evaluate to r. Can this be currently done in > sympy. I am trying to clean up some old code that has a lot of hacks in it > (curvilinear coordinates). > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to sympy@googlegroups.com. > To unsubscribe from this group, send email to sympy+unsubscribe@** > googlegroups.com <sympy%2bunsubscr...@googlegroups.com>. > For more options, visit this group at http://groups.google.com/** > group/sympy?hl=en <http://groups.google.com/group/sympy?hl=en>. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.