Updates:
        Labels: NeedsReview

Comment #19 on issue 1434 by fab...@fseoane.net: substitution doesn't work  
for sqrt()
http://code.google.com/p/sympy/issues/detail?id=1434

Right. I think the following should be enough

diff --git a/sympy/core/tests/test_numbers.py  
b/sympy/core/tests/test_numbers.py
index c93c821..723a889 100644
--- a/sympy/core/tests/test_numbers.py
+++ b/sympy/core/tests/test_numbers.py
@@ -201,6 +201,8 @@ def test_powers_Integer():
      assert S(-16) ** Rational(1, 4) == 2 * (-1)**Rational(1,4)
      assert S(9)   ** Rational(3, 2) == 27
      assert S(-9)  ** Rational(3, 2) == -27*I
+    assert S(27)  ** Rational(2, 3) == 9
+    assert S(-27) ** Rational(2, 3) == 9 * (S(-1) ** Rational(2, 3))

      # not exact roots
      assert (-3) ** (S(1)/2)  == sqrt(-3)
@@ -210,6 +212,8 @@ def test_powers_Integer():
      assert (-3) ** (S(7)/2)  == - I * 27 * sqrt(3)
      assert (2)  ** (S(3)/2)  == 2 * sqrt(2)
      assert (2)  ** (S(-3)/2) == sqrt(2) / 4
+    assert (81) ** (S(2)/3)  == 9 * (S(3) ** (S(2)/3))
+    assert (-81) ** (S(2)/3)  == 9 * (S-(3) ** (S(2)/3))

      # join roots
      assert sqrt(6) + sqrt(24) == 3*sqrt(6)


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to