I worked it out and realized I got the same thing as awelynant.

alpha = arccos((fx+ez)/(z^2+x^2))
alpha = arcsin((fz-ex)/(z^2+x^2))

those should be the same if your values for e,d,z and x are valid.