First time here? Check out the FAQ!
answered 2020-08-11 09:25:14 +0100
A possible one-liner :
sage: (AA["x"](x^2-AA(sqrt(3)))).roots()
which can be abrbreviated as
sage: (x^2-AA(sqrt(3))).polynomial(AA).roots()
HTH,