GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
1bnf = bnfinit(f,1); 2n = poldegree(f); 3un = lift(bnf.tufu); 4 5p2v(n,b) = vector(n,j,polcoeff(b,j-1)); 6 7\\ print units 8print("[ "); 9for(i=1,#un, print(p2v(n,un[i]),",")); 10print("];\n"); 11 12