Updates:
Status: Started
Comment #8 on issue 1188 by ondrej.certik: integrate(1/sin(x)**2,x) fails
http://code.google.com/p/sympy/issues/detail?id=1188
Thanks! First of all: many thanks for attacking this problem!
Now some technical things:
* all tests must pass, e.g. if you do "./setup.py test", it must all run.
You can
start by fixing for example the white space failures:
$ bin/test sympy/utilities/
============================= test process starts
==============================
executable: /usr/bin/python (2.5.4-final-0)
sympy/utilities/tests/test_code_quality.py[2] F.
[FAIL]
sympy/utilities/tests/test_decorator.py[1] .
[OK]
sympy/utilities/tests/test_iterables.py[4] ....
[OK]
sympy/utilities/tests/test_lambdify.py[25] ...........f.............
[OK]
sympy/utilities/tests/test_pickling.py[?] Failed to import
[FAIL]
sympy/utilities/tests/test_pytest.py[1] .
[OK]
sympy/utilities/tests/test_tests_names.py[1] .
[OK]
________________________________________________________________________________
________ /home/ondra/repos/sympy/sympy/utilities/tests/test_pickling.py
________
File "/home/ondra/repos/sympy/sympy/utilities/tests/test_pickling.py",
line 203, in
<module>
from sympy.integrals.trigonometry import Cos_2k_integrate,
Sin_2k_integrate
ImportError: cannot import name Cos_2k_integrate
________________________________________________________________________________
sympy/utilities/tests/test_code_quality.py:test_no_trailing_whitespace_and_no_tabs
File "/home/ondra/repos/sympy/sympy/utilities/tests/test_code_quality.py",
line 63,
in test_no_trailing_whitespace_and_no_tabs
check_directory_tree(sympy_path)
File "/home/ondra/repos/sympy/sympy/utilities/tests/test_code_quality.py",
line 43,
in check_directory_tree
assert False, message_space % (fname, idx+1)
AssertionError: File contains trailing whitespace:
/home/ondra/repos/sympy/sympy/integrals/trigonometry.py, line 58.
= tests finished: 32 passed, 1 failed, 1 xfailed, 1 exceptions in 0.70
seconds =
DO *NOT* COMMIT!
I don't know which editor you use. I use vim and I use this to highlight
all trailing
whitespace:
if has('gui_running')
hi WhiteSpaceEOL guibg=#FF0000
else
hi WhiteSpaceEOL ctermbg=Red
endif
match WhitespaceEOL /\s\+\%#\@<!$/
I am sure a similar thing can be done in every major editor.
* Then I have a comment to this:
+def sin_even_integrate(k,x):
+
+ class Sin_2k_integrate(PolynomialSequence):
+ """efficient integrate(sin(x)**2k, x)"""
+
+ @staticmethod
+ @recurrence_memo([_x])
+ def calc(k, prev):
+ """recursively calculate \int(sin(x)**2k, x)
+
...
It's not very nice to put a class inside a function etc. Let's implement
everything
as a class, or everything as a function.
The algorithm that you propose seems simple (I like that!) so it should be
easy to
fix it.
But otherwise it seems pretty good. It's a very good start to get this
issue fixed.
Thanks!
--
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
-~----------~----~----~----~------~----~------~--~---