我已经安装了包" gmp"一般来说,我可以使用该库,例如调用pow.bigz(),但我需要切换到大整数并遇到问题:
> cat(factorize(121), "\n") 02 00 00 00 01 00 00 00 01 00 00 00 0b 00 00 00 01 00 00 00 01 00 00 00 0b 00 00 00
答案 0 :(得分:3)
#Self解释了例子
#eg1 big-big-numbers
library(gmp)
x <- pow.bigz(5,4^9) #x<- 5^4^3^2
cat("5^4^3^2, Digits: ",sizeinbase(x, b=10))
#eg2 big mult
mul.bigz(1.2345e+276, 5.6789e+255)
#eg3
x <- as.bigz("12345678987654321")
factorize(x)