Forgot to add : pM.eigenvectors_right() doesn’t returns after 5 hours… And, yes, all pM‘s elements have a radical expression :
sage: sM [ -sqrt(2) - 1 1/4*I*sqrt(759) - 1/4 -2*sqrt(3)] [ 1/2*I*sqrt(3) + 1/2 1/8*sqrt(33) + 1/8 -1/5*sqrt(29) + 3/5] [ 0 1/4 1/2*I*sqrt(23) + 1/2] HTH, Le vendredi 11 juin 2021 à 09:51:46 UTC+2, Emmanuel Charpentier a écrit : > As the first part of a demonstration on eigensystems, I was surprised to > see that computing QQbar polynomial roots was way slower that computing > the roots of the same polynomial expressed as a symbolic expression, or > solveing it : > > # Relative timings of QQbar.roots and solve > from time import time as stime > BR = QQbar > Dim = 3 > set_random_seed(0) > pM = MatrixSpace(BR, Dim).random_element() > sM = matrix([[SR(u.radical_expression()) for u in v] for v in pM]) > sl = var("sl") > slI = sl*diagonal_matrix([1]*Dim) > sCM = sM - slI > sCP = sCM.det() > t0 = stime() > SS = solve(sCP, sl) > t1 = stime() > SR = sCP.roots() > t2 = stime() > R1.<pl> = BR[] > plI = pl*diagonal_matrix([1]*Dim) > pCM = pM - plI > pCP = pCM.det() > t3 = stime() > SP = pCP.roots() > t4 = stime() > print("solve : %7.2f, roots(symbolic) : %7.2f, roots(QQbar) : %7.2f"%\ > (t1 -t0, t2 - t1, t4 - t3)) > > gives : > > solve : 2.36, roots(symbolic) : 2.04, roots(QQbar) : 600.07 > > a quick check on Cocalc <https://cocalc.com> showed the same behavior in > 9.1 ; so if it is a problem, it is not a recent one… > > Is this the expected behavior ? > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/5cda36c5-ec20-49c1-b126-93b01e868991n%40googlegroups.com.