Some new GP features quadunitnorm, quadunitindex quadunitnorm(D) returns the norm of fundamental unit of the order of discriminant D. ? D=4*nextprime(2^40); ? norm(quadunit(D)) %75 = 1 ? quadunitnorm(D) %76 = 1 quadunitindex(D, f) return the index of the unit group of the order of conductor f in the unit group of the order of fundamental discriminant D. ? quadunitindex(5,13) %77 = 7 ? w^7 %78 = 8+13*w