Re: [R] R- exp(-1000) ? - how to get R to give me an actual answer ?

2005-10-26 Thread Simon Blomberg
At 03:42 PM 26/10/2005, you wrote: We can double check this with yacas which is a free computer algebra system that supports arbitrary precision math: In N(Exp(-1000)) Out 0.5075958898e-434 Or in Axiom, which is open source too: numeric exp(-1000) 0.50759588975494567653E-434 Type:

[R] R- exp(-1000) ? - how to get R to give me an actual answer ?

2005-10-25 Thread rramacha
Dear All, I am a novice user of the R software package. When I try and compute, exp(-1000) or exp(-2000), i get the answer as zero. Is there any way i can get R to compute the answer and give me an actual number ? ( by increasing the precision or any other method). If I cannot get R to give

Re: [R] R- exp(-1000) ? - how to get R to give me an actual answer ?

2005-10-25 Thread Gabor Grothendieck
Since log base 10 is log(x)/log(10) the exponent is: floor(log(exp(-1000))/log(10)) = floor(-1000/log(10)) which in an R session gives: floor(-1000/log(10)) [1] -435 and the mantissa is: exp(-1000)/10^(-435) = exp(-1000)/exp(-435*log(10))