Issue 1158: regression: roots of polys
http://code.google.com/p/sympy/issues/detail?id=1158

Comment #1 by mattpap:
The first case works with 'cubics' flag set:

In [1]: p1 = ((x-2)*(x+3)*(x-4)).expand()

In [2]: roots(p1, x, cubics=True)
Out[2]: {-3: 1, 2: 1, 4: 1}

which uses factor() if coefficients are in Z or Q, or cubics formula  
otherwise.

The other case works without this flag because x=1 is extracted explicitly.  
The
reason root() function was implemented this was is that at the time of  
writing
rootfinding.py module, factorization routines were buggy and hanged often.

Now factor() is fixed and is quite fast so we can use it in roots() by  
default. Feel
free to fix this issue. Just remember that factorization works only for  
coefficients
in Z and Q (at the moment) and there are much cheaper tools like functional  
or
square-free decomposition (which work with (almost) arbitrary  
coefficients). So
factorization should be used when necessary (in the last resort).



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