CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
1
bnf = bnfinit(f,1);
2
n = poldegree(f);
3
un = lift(bnf.tufu);
4
nr = bnfisintnorm( bnf, nrm);
5
6
p2v(n,b) = vector(n,j,polcoeff(b,j-1));
7
8
\\ print units
9
print("[[ ");
10
for(i=1,#un, print(p2v(n,un[i]),","));
11
print("],\n");
12
13
\\ print norm elements
14
print(" [ ");
15
for (i=1, #nr, print(p2v(n,nr[i]),",\n"));
16
print("]];");
17
18
19