[R] Computing 'exp(1e3)*0' correctly....

CHEL HEE LEE gnustats at gmail.com
Sun Sep 2 00:52:53 CEST 2012


I have some trouble to deal the value of 'NaN'.  For example, 

> exp(1e3)
[1] Inf
> exp(1e3)*0
[1] NaN

The correct answer should be 0 rather than NaN.  I will very appreciate
if anyone can share some technique to get a correct answer.



More information about the R-help mailing list