Updates:
Labels: -NeedsReview
Comment #1 on issue 1493 by ondrej.certik: factor a minus 1 out of
fractions in simplify
http://code.google.com/p/sympy/issues/detail?id=1493
It doesn't pass tests:
sympy/simplify/tests/test_rewrite.py:'XPASS: test_trim_xfail'
sympy/simplify/tests/test_simplify.py:'XPASS: test_separate_X1'
________________________________________________________________________________
____________ sympy/solvers/tests/test_solvers.py:test_linear_system
____________
File "/home/ondrej/repos/sympy/sympy/solvers/tests/test_solvers.py", line
153, in
test_linear_system
{y: 0, z: (-t-t*n)/n, x: (-t-t*n)/n}
AssertionError
________________________________________________________________________________
______________ sympy/solvers/tests/test_solvers.py:test_tsolve_1
_______________
File "/home/ondrej/repos/sympy/sympy/solvers/tests/test_solvers.py", line
240, in
test_tsolve_1
[(-5*LambertW(-7*2**(Rational(4, 5))*6**(Rational(1, 5))*log(7)/10) -
4*log(7))/(3*log(7))]]
AssertionError
tests finished: 1523 passed, 2 failed, 6 skipped, 26 xfailed, 2 xpassed in
167.62
seconds
DO *NOT* COMMIT!
But otherwise the patch is good. Could you write a log in a better way? :)
http://groups.google.com/group/sympy/browse_thread/thread/5c876ddd8eb12bd1
Also, you can apply this patch to simplify your patch:
diff --git a/sympy/simplify/simplify.py b/sympy/simplify/simplify.py
index 343e882..e632d41 100644
--- a/sympy/simplify/simplify.py
+++ b/sympy/simplify/simplify.py
@@ -1173,7 +1173,7 @@ def simplify(expr):
if expr.could_extract_minus_sign():
n, d = expr.as_numer_denom()
if d != 0:
- expr = sympify(-1)*n/(sympify(-1)*d)
+ expr = -n/(-d)
return expr
def nsimplify(expr, constants=[], tolerance=None, full=False):
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---