Status: Accepted
Owner: ----
CC: mattpap
Labels: Type-Defect Priority-High

New issue 1276 by ondrej.certik: solve(-1 + x**2 +  
0.111111111111111*(1.00000000000000 + 2.00000000000000*x)**2,x) fails
http://code.google.com/p/sympy/issues/detail?id=1276

In [1]: solve(-1 + x**2 + 0.111111111111111*(1.00000000000000 +
2.00000000000000*x)**2,x)
---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)

/home/ondra/repos/sympy/<ipython console> in <module>()

/home/ondra/repos/sympy/sympy/solvers/solvers.pyc in solve(f, *symbols,
**flags)
     173             poly = f.as_poly( symbol )
     174             assert poly is not None
--> 175             result = roots(poly, cubics=True, quartics=True).keys()
     176
     177         elif strategy == GS_RATIONAL:

/home/ondra/repos/sympy/sympy/polys/rootfinding.pyc in roots(f, *symbols,
**flags)
     275
     276             for i, h in enumerate(poly_sqf(g)):
--> 277                 for zero in _roots(h):
     278                     if zeros.has_key(zero):
     279                         zeros[zero] += i+1

/home/ondra/repos/sympy/sympy/polys/rootfinding.pyc in _roots(g)
     232                     [factors] = poly_factors(g)[1:]
     233
--> 234             if n > 1 and len(factors) != 1:
     235                 # extract first rational roots
     236                 # this decomposes the polynomial into polynomials of

UnboundLocalError: local variable 'factors' referenced before assignment


--
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to