Go to the first, previous, next, last section, table of contents.


algtodalg, dalgtoalg, dptodalg, dalgtodp

algtodalg(alg)
:: Converts an algebraic number alg to a DAlg.
dalgtoalg(dalg)
:: Converts a DAlg dalg to an algebraic number.
dptodalg(dp)
:: Converts an algebraic number alg to a DAlg.
dalgtodp(dalg)
:: Converts a DAlg dalg to an algebraic number.
return
An algebraic number, a DAlg or a list [distributed polynomial,denominator]
alg
an algebraic number containing root
dp
a distributed polynomial over Q
[0] A=newalg(x^2+1);
(#0)
[1] B=newalg(x^3+A*x+A);
(#1)
[2] set_field([B,A]);
0
[3] C=algtodalg((A+B)^10);
((408)*<<2,1>>+(103)*<<2,0>>+(-36)*<<1,1>>+(-446)*<<1,0>>
+(-332)*<<0,1>>+(-218)*<<0,0>>)
[4] dalgtoalg(C);
((408*#0+103)*#1^2+(-36*#0-446)*#1-332*#0-218)
[5] D=dptodalg(<<10,10>>/10+2*<<5,5>>+1/3*<<0,0>>);
((-9)*<<2,1>>+(57)*<<2,0>>+(-63)*<<1,1>>+(-12)*<<1,0>>
+(-60)*<<0,1>>+(1)*<<0,0>>)/30
[6] dalgtodp(D);
[(-9)*<<2,1>>+(57)*<<2,0>>+(-63)*<<1,1>>+(-12)*<<1,0>>
+(-60)*<<0,1>>+(1)*<<0,0>>,30]
Reference
section set_field


Go to the first, previous, next, last section, table of contents.