Explain the output
>> # a is a (large) vector with numerical elements >> any(is.nan(a))  FALSE >> any(is.nan(exp(a)))  FALSE >> any(is.nan(exp(1.0 * a)))  FALSE >> any(is.nan(exp(0.0 * a)))  TRUE
See something surprizing? Suddenly a NaN where there was none before?
Can you think why this is happening?
If you give up, then click-and-drag to select and see the hint below:
>> # Multiplying an Infinity with zero gives a NaN >> Inf * 0  NaN