Hi

Factoring first and then calculating the roots of the factors (you don't need the multiplicity of the factor) worked fast for me...


Side note:
In AA I noticed that most operations become much faster after a num.simplify(). But in this case the simplify operation is slow itself...

Best
    Jonas

On 20.09.2016 14:22, Marc Mezzarobba wrote:
Clemens Heuberger wrote:
x = polygen(QQ)
equation = -960000000*x^7 + 416000000*x^6 - 66400000*x^5 + 5600000*x^4
- 280000*x^3 + 8400*x^2 - 140*x + 1 roots = equation.roots(QQbar)
a_root = roots[-1][0]
abs_root = abs(a_root)
[...]
Is this expected behaviour?

Well, QQbar has a number of well-known but not yet fixed efficiency
problems...

I am intersted in the smallest root(s) in
absolute value only, any suggestions for achieving that in less time?

You could perhaps compute a polynomial whose roots include the z·conj(z)
for all roots z of equation (e.g., with a resultant), factor that
polynomial, and sort its root numerically while increasing the
precision until you can tell which of the factors correspond to
dominant roots. Or something like that :-/


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to