你可以尝试使用gmp包中的bigz类:> library("gmp") > 2^10000 [1] Inf > 2^(as.bigz(10000)) [1] "199506.... and a LOT of more numbers! 它基本上将数字存储为字符串,从而避免了整数/双精度限制。