[R] Beyond double-precision?

spencerg spencer.graves at prodsyse.com
Sat May 9 05:35:53 CEST 2009


      Are all your numbers positive?  If yes, have you considered using 
logarithms? 

      I would guess it is quite rare for people to compute likelihoods.  
Instead I think most people use log(likelihoods).  Most of the 
probability functions in R have an option of returning the logarithms. 

      Hope this helps. 
      Spencer

joaks1 wrote:
> I need to perform some calculations with some extremely small numbers (i.e.
> likelihood values on the order of 1.0E-16,000).  Even when using the
> double() function, R is rounding these values to zero.  Is there any way to
> get R to deal with such small numbers?
>
> For example, I would like to be able to calculate e^-10000 (i.e.
> exp(-10000)) without the result being rounded to zero.
>
> I know I can do it in Mathematica, but I would prefer to use R if I can. 
> Any help would be appreciated!
>
> Many Thanks in Advance!
>




More information about the R-help mailing list