added NaN test for gamma_p