source 2005 Doche--Lange, plus common-subexpression elimination compute A = Y1 Z2 + Z1 Y2 compute B = X1 Z2 + Z1 X2 compute C = B^2 compute D = Z1 Z2 compute E = B C compute F = (A^2 + A B + a2 C) D + E compute X3 = B F compute Y3 = C (A X1 + Y1 B) Z2 + (A + B) F compute Z3 = E D