Some new GP features halfgcd for polynomials Let a, b be two polynomials. halfgcd(a,b) returns [M, [x, y] ] where M is a 2 × 2 matrix of determinant of degree 0 such that M*[x,y] = [a,b] and deg a ≥ max(deg x, deg y)/2 > deg b ? P = truncate(sqrt(1+x+O(x^4))); Q = x^4; ? [M,C] = halfgcd(P, Q) %17 = [[-16*x-32,1;-1/4*x^2+2*x+6,1/64*x-5/32], % [-4*x^2-32*x-32,5*x+6]~] ? M*[P,Q]~ %18 = [-4*x^2-32*x-32,5*x+6]~