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

2012-09-02 Thread CHEL HEE LEE
I very appreciate for good comments and tip regarding my question. All postings are excellent to know when I am writing such expression in R. Thank you so much, and my question is completely resolved from all your postings. On Sun, 2012-09-02 at 00:50 +0100, Rui Barradas wrote: > Em 02-09-2012 00

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

2012-09-01 Thread Rolf Turner
On 02/09/12 10:52, CHEL HEE LEE wrote: 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. There is no techniqu

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

2012-09-01 Thread Rui Barradas
Em 02-09-2012 00:10, Jeff Newmiller escreveu: I disagree that this answer is "wrong". If you want a mathematically correct answer you are going to have to obtain it by applying intelligence to the algorithm in which this calculation occurred. Logarithms are the product of intelligence. And t

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

2012-09-01 Thread Jeff Newmiller
I disagree that this answer is "wrong". If you want a mathematically correct answer you are going to have to obtain it by applying intelligence to the algorithm in which this calculation occurred. This is not a mailing list about numerical methods in general, so it probably isn't appropriate to

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

2012-09-01 Thread CHEL HEE LEE
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. __ R-help@r-proje