Comment #5 on issue 1612 by asmeurer: Symbol('f')(x) != Function('f')(x)
http://code.google.com/p/sympy/issues/detail?id=1612
It seems I jumped the gun a little bit in saying that all tests pass.
There is a strange error. There is a failure in the simplify tests. But
if I add the following print statements, the tests pass:
diff --git a/sympy/simplify/tests/test_simplify.py
b/sympy/simplify/tests/test_simplify.py
index 6ad1772..34bbdb9 100644
--- a/sympy/simplify/tests/test_simplify.py
+++ b/sympy/simplify/tests/test_simplify.py
@@ -166,6 +166,9 @@ def test_simplify():
def test_simplify_other():
assert simplify(sin(x)**2 + cos(x)**2) == 1
assert simplify(gamma(x + 1)/gamma(x)) == x
+ print
+ print simplify(sin(x)**2 + cos(x)**2 + factorial(x)/gamma(x))
+ print simplify(sin(x)**2 + cos(x)**2 + factorial(x)/gamma(x))
assert simplify(sin(x)**2 + cos(x)**2 + factorial(x)/gamma(x)) == 1 + x
assert simplify(Eq(sin(x)**2 + cos(x)**2, factorial(x)/gamma(x))) ==
Eq(1, x)
and I get
$./bin/test sympy/simplify/tests/test_simplify.py
============================= test process starts
==============================
executable: /sw/bin/python (2.7.1-final-0)
ground types: gmpy
sympy/simplify/tests/test_simplify.py[37] ..ff....
(x + 1)*x!/rf(1, x)
x + 1
.............................
[OK]
======== tests finished: 35 passed, 2 expected to fail, in 4.58 seconds
========
I can't reproduce this in isympy, but somehow, the first iteration of
simplify gives a wrong result and further ones give a right one. By the
way, we should implement the -C option to the tester to run the tests
without the cache.
--
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.