On Jul 14, 11:37 am, mac8090 <bonzerpot...@hotmail.com> wrote:
> For a given k, is it possible to instantly get an k-th root of unity
> in sage without making extra fields, or by using e^(2*pi*I/k)?

I'm curious why you are so opposed to creating a number field.
Basically, there are three one-liners you can use:

CyclotomicField(k).gen() -- creates a number field element.
CC.zeta(k) -- creates an inexact, fixed-precision approximation.
QQbar.zeta(k) -- a clever hybrid, which behaves like an element of CC
but also remembers that it's algebraic and can calculate itself to
arbitrary precision if you ask it to.

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

Reply via email to