This is derived from Abramowitz and Stegun (see reference below), page 508, where a full asymptotic series is given. They switch the sign of the exponent in exp(iπa) in the right half-plane but this is immaterial, as the term is negligible there or else a is an integer and the sign doesn't matter.