source 2007 Bernstein--Lange
compute XX = X1^2
compute YY = Y1^2
compute ZZ = (c Z1)^2
compute D = XX+YY
compute DD = D^2
compute E = 4 (D-d ZZ)
compute H = 2 D (YY-XX)
compute P = DD-XX E
compute Q = DD-YY E
compute X3 = (H+Q) Q X1
compute Y3 = (H-P) P Y1
compute Z3 = P Q Z1