source 2007 Bernstein--Lange assume Z2 = 1 compute B = Z1^2 compute C = X1 X2 compute D = Y1 Y2 compute E = d C D compute F = B-E compute G = B+E compute X3 = Z1 F ((X1+Y1)(X2+Y2)-C-D) compute Y3 = Z1 G (D-C) compute Z3 = c F G