Comment #10 on issue 1320 by johann.cohentanugi: simplify does not simplify
commutted diffs
http://code.google.com/p/sympy/issues/detail?id=1320
indeed, thanks. So here is my patch, I took the liberty to add the few
trivial diff
tests in a separate function... I do not know why I get the nsimplify lines
in my
patch, probably some mystery with DVCS that I am not familiar with.
[co...@jarrett sympy]$ git diff -r HEAD
sympy/simplify/tests/test_simplify.py
diff --git a/sympy/simplify/tests/test_simplify.py
b/sympy/simplify/tests/test_simplify.py
index 2b9b2e3..d3dc547 100644
--- a/sympy/simplify/tests/test_simplify.py
+++ b/sympy/simplify/tests/test_simplify.py
@@ -1,7 +1,7 @@
from sympy import Symbol, symbols, together, hypersimp, factorial,
binomial, \
collect, Function, powsimp, separate, sin, exp, Rational,
fraction, \
simplify, trigsimp, cos, tan, cot, log, ratsimp, Matrix, pi,
integrate, \
- solve, nsimplify, GoldenRatio, sqrt, E, I, sympify, atan,
Derivative, S
+ solve, nsimplify, GoldenRatio, sqrt, E, I, sympify, atan,
Derivative, S, diff
from sympy.utilities.pytest import XFAIL
@@ -353,3 +353,13 @@ def test_nsimplify():
assert nsimplify(0.33333, tolerance=1e-4) == Rational(1,3)
assert nsimplify(2.0**(1/3.), tolerance=0.001) == Rational(635,504)
assert nsimplify(2.0**(1/3.), tolerance=0.001, full=True) ==
2**Rational(1,3)
+
+def test_diff():
+ x = Symbol("x")
+ y = Symbol("y")
+ f = Function("f")
+ g = Function("g")
+ assert simplify(g(x).diff(x)*f(x).diff(x)-f(x).diff(x)*g(x).diff(x))
== 0
+ assert simplify(2*f(x)*f(x).diff(x)-diff(f(x)**2,x)) == 0
+ assert simplify(diff(1/f(x),x)+f(x).diff(x)/f(x)**2) == 0
+ assert simplify(f(x).diff(x,y)-f(x).diff(y,x)) == 0
--
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
-~----------~----~----~----~------~----~------~--~---