On Feb 8, 12:52 pm, William Stein <[email protected]> wrote:
> Since you're lucky and all conjugates are expressible in terms of
> radicals, the following
> easily gives all 8:
>
> sage: t = sqrt(2-sqrt(2)) + i*sqrt(sqrt(2)-1)
> sage: f = t.minpoly(); f
> x^8 - 12*x^6 + 6*x^4 - 12*x^2 + 1

Do you really need radicals, or do you just want exact results rather
than floating-point approximations?

If the latter, you can use:

sage: t = sqrt(2-sqrt(2)) + i*sqrt(sqrt(2)-1)
sage: f = t.minpoly(); f
x^8 - 12*x^6 + 6*x^4 - 12*x^2 + 1
sage: f.roots(ring=QQbar, multiplicities=False)

[-0.2939850909925362?,
 0.2939850909925362?,
 3.401533039052611?,
 -3.401533039052611?,
 0.7653668647301795? + 0.6435942529055826?*I,
 0.7653668647301795? - 0.6435942529055826?*I,
 -0.7653668647301795? + 0.6435942529055826?*I,
 -0.7653668647301795? - 0.6435942529055826?*I]

While elements of QQbar usually print as floating-point
approximations, operations with them are actually exact.

Carl

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to