[R] Handling very large integers with factorial and combinat (nCm)
Marco Chiarandini
machud at intellektik.informatik.tu-darmstadt.de
Mon Apr 4 10:46:03 CEST 2005
Dear list,
perhpas this question is more suitable for R-dev but since I am not
really a developer I post it here first.
Apparently the following lines do not create any problem in R:
library(combinat)
r <- 20; b <- 2;
sum( sapply(0:r,function(x) nCm(r,x)^(2*b)) ) > 2^64
while in C I obtain an overflow of data even using unsigned long long
and with long double I incurr in precision problems.
Where can I find information about how R (or the combinat package)
handles very large integer numbers?
Thank you for consideration,
Marco
More information about the R-help
mailing list