added NaN test for log
added NaN test for exp