Some new GP features halfgcd for integers Let a, b be two integers. halfgcd(a,b) returns [M, [x, y] ] where M is a 2 × 2 matrix of determinant ±1 such that M*[x,y] = [a,b] and a ≥ p max(|x|, |y|) > b ? [M,C] = halfgcd(23,59) %14 = [[3,-1;-5,2],[10,3]~] ? M*[23,59]~ %15 = [10,3]~