added higher order autodiff tests for gamma_p and gamma_q