First time here? Check out the FAQ!
answered 2023-01-03 01:11:14 +0100
Here is a full example to my advice from comments:
z=var('z') f=(z-1/2*I)*(z-pi*I)*(z-sqrt(2)*I) g=f(z=z*I) [x[0] for x in g.roots() if x[0] in QQ]
[1/2]