Comment #16 on issue 694 by asmeurer: Add tests from "Review of CAS
mathematical capabilities", by Michael Wester
http://code.google.com/p/sympy/issues/detail?id=694
I'm having trouble with test M3: solve(x**4+x**3+x**2+x+1,x)
Plugging this expression in to SymPy generates a humongous expression.
With my terminal fullscreen (238x58), the
solution list fills my whole screen with pretty printing turned off, and
several screens with it turned on (obviously, I refrain
from pasting it here). Running
l = []
s = solve(x**4+x**3+x**2+x+1,x)
for i in s:
l.append(simplify(i))
reduces the size of the output to about half of my screen, but it is still
huge. I ran the test command in Maple, and got
f:=solve(x**4+x**3+x**2+x+1,x);
f:=-1/4+(1/4)*sqrt(5)+(1/4*I)*sqrt(2)*sqrt(5+sqrt(5)),
-1/4-(1/4)*sqrt(5)+(1/4*I)*sqrt(2)*sqrt(5-sqrt(5)), -1/4-
(1/4)*sqrt(5)-(1/4*I)*sqrt(2)*sqrt(5-sqrt(5)),
-1/4+(1/4)*sqrt(5)-(1/4*I)*sqrt(2)*sqrt(5+sqrt(5))
I had no luck getting even Maple to simplify the SymPy expression down to
this, though that could just be because I am
relatively new to Maple. I was able to determine that they are the same
solutions by numerically evaluating them both.
Test M4 is verify a solution of M3, but
for i in s:
print simplify((x**4+x**3+x**2+x+1).subs({x:i}))
raises a maximum recursion error. Removing the simplify just makes each
print fill the whole screen (they should all be 0).
Any idea how to make this return a more simplified expression? Should I
report this as a bug? The solution SymPy gives is
technically correct (I think), but I hardly feel that this should write an
assert line in the test_wester.py that is several hundred
characters long when it could be much simpler.
--
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
-~----------~----~----~----~------~----~------~--~---