Hello,

First: Thanks for developing sympy!

I'm getting the error below, using sympy 0.7.5 on python 2.7.8, MacOS 10.6. 
Could anyone explain what I'm doing wrong?

Many thanks!
Dario



import sympy as s

x= s.Symbol('x')
y= 2*s.sin(x) - 2*s.sin(2*x)
s.solve(y)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/solvers/solvers.py"
, line 901, in solve
    solution = _solve(f[0], *symbols, **flags)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/solvers/solvers.py"
, line 1289, in _solve
    return _solve(newf, symbol, **flags)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/solvers/solvers.py"
, line 1289, in _solve
    return _solve(newf, symbol, **flags)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/solvers/solvers.py"
, line 1397, in _solve
    result = _tsolve(f_num, symbol, **flags)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/solvers/solvers.py"
, line 2279, in _tsolve
    return _solve(f, sym, **flags)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/solvers/solvers.py"
, line 1147, in _solve
    soln = _solve(m, symbol, **flags)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/solvers/solvers.py"
, line 1397, in _solve
    result = _tsolve(f_num, symbol, **flags)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/solvers/solvers.py"
, line 2320, in _tsolve
    return _solve(rewrite - rhs, sym, **flags)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/solvers/solvers.py"
, line 1418, in _solve
    for den in dens)]
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/solvers/solvers.py"
, line 1418, in <genexpr>
    for den in dens)]
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/solvers/solvers.py"
, line 285, in checksol
    return abs(val.n(18).n(12, chop=True)) < 1e-9
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/core/evalf.py"
, line 1284, in evalf
    result = evalf(self, prec + 4, options)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/core/evalf.py"
, line 1184, in evalf
    r = rf(x, prec, options)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/core/evalf.py"
, line 457, in evalf_add
    terms = [evalf(arg, prec + 10, options) for arg in v.args]
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/core/evalf.py"
, line 1184, in evalf
    r = rf(x, prec, options)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/core/evalf.py"
, line 615, in evalf_pow
    re, im, re_acc, im_acc = evalf(base, prec + 5, options)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/core/evalf.py"
, line 1190, in evalf
    re, im = x._eval_evalf(prec).as_real_imag()
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/polys/rootoftools.py"
, line 425, in _eval_evalf
    root = findroot(func, x0)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/mpmath/calculus/optimization.py"
, line 931, in findroot
    fx = f(x0[0])
  File "<string>", line 1, in <lambda>
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/core/expr.py"
, line 207, in __float__
    raise TypeError("can't convert expression to float")
TypeError: can't convert expression to float



-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/703e3b84-3103-4d7a-9028-ab7576ccde59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to