Well, either upgrading to Python 2.7.1 or running ./setup.py clean did
help (However, I used py.cleanup before reporting any of this. And I
was able reproduce it with a clean clone.). Now I get a much nicer
failure:


executable:   /usr/bin/python2  (2.7.1-final-0)

sympy/solvers/tests/
test_solvers.py[18] ..............F...                [FAIL]

________________________________________________________________________________
______________ sympy/solvers/tests/test_solvers.py:test_tsolve_1
_______________
  File "/home/one/src/sympy/sympy/solvers/tests/test_solvers.py", line
232, in test_tsolve_1
    [-((4*log(7) +
5*LambertW(-7*2**Rational(4,5)*6**Rational(1,5)*log(7)/10))/
(3*log(7)))]]
AssertionError

============= tests finished: 17 passed, 1 failed, in 2.82 seconds
=============
DO *NOT* COMMIT!

In isympy:

In [1]: solve(2*(3*x+4)**5 - 6*7**(3*x+9), x)
Out[1]:
⎡ ⎛                     ⎛   5 ⎽⎽⎽       ⎞⎞⎤
⎢ ⎜                     ⎜-7⋅╲╱ 3 ⋅log(7)⎟⎟⎥
⎢-⎜4⋅log(7) + 5⋅LambertW⎜───────────────⎟⎟⎥
⎢ ⎝                     ⎝       5       ⎠⎠⎥
⎢─────────────────────────────────────────⎥
⎣                 3⋅log(7)                ⎦

In [2]: _[0].evalf()
Out[2]: -1.8108123000607 - 1.59457436286436⋅ⅈ


In [3]: nsolve(2*(3*x+4)**5 - 6*7**(3*x+9), x, -1.8 - 1.6j)
Out[3]: (-1.8108123000607 - 1.59457436286436j)

This is due to this strange inconsistency (due to hashing):

In [1]: s = solve(2*(3*x+4)**5 - 6*7**(3*x+9), x)

In [2]: s
Out[2]:
⎡ ⎛                     ⎛   5 ⎽⎽⎽       ⎞⎞⎤
⎢ ⎜                     ⎜-7⋅╲╱ 3 ⋅log(7)⎟⎟⎥
⎢-⎜4⋅log(7) + 5⋅LambertW⎜───────────────⎟⎟⎥
⎢ ⎝                     ⎝       5       ⎠⎠⎥
⎢─────────────────────────────────────────⎥
⎣                 3⋅log(7)                ⎦

In [3]: sstr(s)
Out[3]: [-(4*log(7) + 5*LambertW(-7*3**(1/5)*log(7)/5))/(3*log(7))]

In [4]: [-(4*log(7) + 5*LambertW(-7*3**(S(1)/5)*log(7)/5))/(3*log(7))]
Out[4]:
⎡            ⎛   5 ⎽⎽⎽       ⎞           ⎤
⎢            ⎜-7⋅╲╱ 3 ⋅log(7)⎟           ⎥
⎢- 5⋅LambertW⎜───────────────⎟ - 4⋅log(7)⎥
⎢            ⎝       5       ⎠           ⎥
⎢────────────────────────────────────────⎥
⎣                3⋅log(7)                ⎦


I'm working on a patch.


Vinzent

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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?hl=en.

Reply via email to