# Revision history [back]

### A problem with changing rings

Why is this piece of code not working?

a =1; b=1; c=1; m =1; k=6; w = exp((2piI*m )/k) ;

p = x^4 - 6*x^2 -x *(w^(a-c) + w^(c-a) + w^b + w^(-b) + w^(b-c) + w^(c-b) + w^a + w^(-a)) + (3 -w^c - w^(-c) - w^(a+b-c) - w^(-a-b+c) - w^(a-b) - w^(-a+b) );

g =real_part(p).simplify();

q = g.change_ring(QQbar);

I would have thought that I can get the exact roots of "q" above using ".solve" since in the field of algebraic numbers (QQbar) the above should have exact roots.

 2 No.2 Revision slelievre 10168 ●8 ●107 ●203 http://carva.org/samue...

### A problem with changing rings

Why is this piece of code not working?

a =1; b=1; c=1; = 1; b = 1; c = 1; m =1; k=6; = 1; k = 6; w = exp((2piI*m )/k) ;  exp((2*pi*I*m )/k)
p = x^4 - 6*x^2 -x *(w^(a-c) + w^(c-a) + w^b + w^(-b) + w^(b-c) + w^(c-b) + w^a + w^(-a)) + (3 -w^c - w^(-c) - w^(a+b-c) - w^(-a-b+c) - w^(a-b) - w^(-a+b) ); )
g =real_part(p).simplify(); =real_part(p).simplify();
q = g.change_ring(QQbar);g.change_ring(QQbar);


I would have thought that I can get the exact roots of "q" q above using ".solve" .solve since in the field of algebraic numbers (QQbar) (QQbar) the above should have exact roots. roots.

 3 No.3 Revision slelievre 10168 ●8 ●107 ●203 http://carva.org/samue...

### A problem with changing rings

Why is this piece of code not working?

a = 1; b = 1; c = 1; m = 1; k = 6; w = exp((2*pi*I*m )/k)
p = x^4 - 6*x^2 -x *(w^(a-c) + w^(c-a) + w^b + w^(-b) + w^(b-c) + w^(c-b) + w^a + w^(-a)) + (3 -w^c - w^(-c) - w^(a+b-c) - w^(-a-b+c) - w^(a-b) - w^(-a+b) )
w^(-a+b))
g =real_part(p).simplify();
= real_part(p).simplify()
q = g.change_ring(QQbar);
g.change_ring(QQbar)


I would have thought that I can get the exact roots of q above using .solve since in the field of algebraic numbers (QQbar) the above should have exact roots.