John Cook phi inverse code

See http://www.johndcook.com/cpp_phi_inverse.html