On Sun, Dec 03, 2023 at 09:24:51PM +0800, Qian Yun wrote: > Should "froot(4*a^2,4)" return > [exponent = 2, coef = 1, radicand = 2 a] instead of > [exponent = 4, coef = 1, radicand = 4 a^2] ?
Probably. AFAICS easy modification to froot would do this: one needs to separately handle content of polynomials (numerator and denominator). OTOH there is question how far should we go. 'zroot' internally used inside PolynomialRoots needs to factor integers. For large integers it is very expensive, so rather undesirable. OTOH we can do essential root simplification by factoring polynomials. When there is large integer content, factoring polynomial is much cheaper than factoring integers. By factoring polynomials we will not simplify say 'sqrt(2048)' to '32*sqrt(2)', but it is enough to guarantee independence of roots. And by factoring polynomials we can simplify 'sqrt(2*sqrt(2) + 3)' to '1 + sqrt(2)' which 'froot' can not do. So, 'froot' is fairly incomplete simplifier. Its potential advantage is that it may be less expensive than factoring. But then we should avoid really expensive stuff in 'froot'. -- Waldek Hebisch -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/ZWyQKvibnh5dEk3v%40fricas.org.