summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Gourgoulhon <eric.gourgoulhon@obspm.fr>2015-12-06 22:22:35 +0100
committerEric Gourgoulhon <eric.gourgoulhon@obspm.fr>2015-12-06 22:22:35 +0100
commita1ba52a0cb17df7bc45471f7f5491798d485823a (patch)
tree50ab944cfe745cb9ea9197334695b593597eace3
parentFix doctest error in coord_func_symb.py due to #19312 (update to pynac-0.5.2) (diff)
Replace a!=b by not(a==b) in simplify_sqrt_real to cope with the change of logic induced by #19312 (Sage 6.10.beta7)
-rw-r--r--src/sage/manifolds/utilities.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sage/manifolds/utilities.py b/src/sage/manifolds/utilities.py
index 2610d3a..37731aa 100644
--- a/src/sage/manifolds/utilities.py
+++ b/src/sage/manifolds/utilities.py
@@ -121,7 +121,10 @@ def simplify_sqrt_real(expr):
x = SR(the_sqrts[i])
argum = x.operands()[0] # the argument of sqrt
den = argum.denominator()
- if den != 1: # the argument of sqrt is a fraction
+ if not (den == 1): # the argument of sqrt is a fraction
+ # NB: after #19312 (integrated in Sage 6.10.beta7), the above
+ # cannot be written as
+ # if den != 1!:
num = argum.numerator()
if num < 0 or den < 0:
x = sqrt(-num) / sqrt(-den) # new equivalent expression for x