[sage-support] Re: primitive k-th root of unity

2009-07-19 Thread Laurent
>> On a similar note, anybody know why I can't get sage to equate e^ >> (theta*I) == cos(theta) + I*sin(theta) ? >> > > > I don't know. Sage uses Maxima. Does maxima know Euler's formula? > > I suppose that Sage knows Euler's formula because sage: var('x') x sage: real_part(e^(I*x)) e^(-

[sage-support] Re: primitive k-th root of unity

2009-07-14 Thread David Joyner
On Tue, Jul 14, 2009 at 6:37 AM, mac8090 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 a bit confused by your question. If you mean k-th roots of unity in the complex field CC then sage: z =

[sage-support] Re: primitive k-th root of unity

2009-07-14 Thread davidloeffler
On Jul 14, 11:37 am, mac8090 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: Cyclotomi