Vinzent Steinberg wrote:
On 20 Mrz., 22:50, Ondrej Certik <ond...@certik.cz> wrote:
On Sat, Mar 20, 2010 at 2:47 PM, Ondrej Certik <ond...@certik.cz> wrote:
Thanks Aaron!
It may be, that the new polynomials can't handle floating point
numbers (for some algorithmic reasons), in which case imho we should
provide the user with the following options:
a) convert floating point numbers to Rational and run solve(), and at
the end, convert all roots to floating point numbers again, it has the
advantage of finding all the roots (I mean as long as they can be
found analytically)
b) use some numerical algorithms
Maybe for polynomial equations, there are numerical algorithms that
return (find) all roots automatically? nsolve() currently needs an
initial guess.
Wolfram alpha seems to be able to find all 4 roots numerically (and
automatically):

http://www.wolframalpha.com/input/?i=solve(-12*(2*sqrt(3)+%2B+9)+*+12...)

so we should do it too.

For polynomials we could use mpmath.polyroots to determine all roots
numerically. Didn't actually Mateusz implement something like this?
nsolve() is more general, so I'm not sure whether it should special-
case polynomials.

Vinzent


Chapter 9.5 of Numerical recipes has several algorithms specifically for finding polynomial roots. With a little googling, you'll easily find them on the Internet.

cheers,

Toon

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to