[R] Handling very large integers with factorial and combinat (nCm)

From: Marco Chiarandini <machud_at_intellektik.informatik.tu-darmstadt.de>
Date: Mon 04 Apr 2005 - 18:46:03 EST

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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Apr 04 18:58:14 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:01 EST