Cayley-Dickson recomposition
q = dc(A, B)
dc is the 'inverse' of the function cd. Given two complex numbers it returns the quaternion whose Cayley-Dickson decomposition would yield the two complex numbers.
License terms.