Search This Blog

Saturday, August 03, 2013

How to handle large numbers in R ?

Checkout the Brobdingnag package:


 > library(Brobdingnag)
 > exp(1000)/(exp(1007)+5)
[1] NaN

 > as.numeric(exp(as.brob(1000))/(exp(as.brob(1007))+5))
[1] 0.000911882
 >
 
 
Believe me this works awesome.  

Thanks, 
Bidyarthy

No comments:

Post a Comment

Thank you