Real roots of a polynomial in GAP, and RootsFloat function

111 Views Asked by At

Is there a way in GAP to calculate the roots of a polynomial, say $x^2-2$, as real numbers? I know I can express the roots as cyclotomic numbers, but then (real) cyclotomic numbers are not ordered as reals (see https://www.gap-system.org/Manuals/doc/ref/chap18.html, Sect. 18.3), and this is a problem for me. Of course, a method to transform real cyclotomics into reals with usual order is good as well.

I see from "https://math.stackexchange.com/questions/1358173/real-valued-eigenvalues-in-gap" that the powerful function RootsFloat exists and is contained in lib/float.gi, but I don't know how to "import" this function.