source 2015 Renes--Costello--Batina "Complete addition formulas for prime order elliptic curves", Appendix A.2 (and Algorithm 4)
appliesto projective-3
compute t0 = X1 * X2
compute t1 = Y1 * Y2
compute t2 = Z1 * Z2
compute t3 = X1 + Y1
compute t4 = X2 + Y2
compute t3 = t3 * t4
compute t4 = t0 + t1
compute t3 = t3 - t4
compute t4 = Y1 + Z1
compute X3 = Y2 + Z2
compute t4 = t4 * X3
compute X3 = t1 + t2
compute t4 = t4 - X3
compute X3 = X1 + Z1
compute Y3 = X2 + Z2
compute X3 = X3 * Y3
compute Y3 = t0 + t2
compute Y3 = X3 - Y3
compute Z3 = b * t2
compute X3 = Y3 - Z3
compute Z3 = X3 + X3
compute X3 = X3 + Z3
compute Z3 = t1 - X3
compute X3 = t1 + X3
compute Y3 = b * Y3
compute t1 = t2 + t2
compute t2 = t1 + t2
compute Y3 = Y3 - t2
compute Y3 = Y3 - t0
compute t1 = Y3 + Y3
compute Y3 = t1 + Y3
compute t1 = t0 + t0
compute t0 = t1 + t0
compute t0 = t0 - t2
compute t1 = t4 * Y3
compute t2 = t0 * Y3
compute Y3 = X3 * Z3
compute Y3 = Y3 + t2
compute X3 = t3 * X3
compute X3 = X3 - t1
compute Z3 = t4 * Z3
compute t1 = t3 * t0
compute Z3 = Z3 + t1