added NaN test for exp