Consider this code:
Code:
ring A=0,x,lp;
poly f=(x-3/17)*(x+2/3);
I don't see a straightforward way to find the exact (as rational numbers) roots of f. I looked a bit at the documentation and if I use the command
laguerre(f,5,1), I obtain roots up to 5 digits (decimal) precision and not really the rational roots 3/17 and -2/3. Of course I can use
factorize(f) and write a code that extracts the rational roots, but I am sure (I hope) there is a cleaner way to do this. Any hints would be much appreciated. Thanks!