nan_exp function nan_exp(x:Real) -> Real Take the exponential of a value, where nan is treated as -inf.