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
5
p2v(n,b) = vector(n,j,polcoeff(b,j-1));
6
7
\\ print units
8
print("[ ");
9
for(i=1,#un, print(p2v(n,un[i]),","));
10
print("];\n");
11
12