How to apply mathematical operators on numbers more than 50 digits

You could try the other packages listed in the task view. For instance, the gmp package seems fine:

library(gmp)

number <- paste(rep(1, 10), collapse = '')
x <- as.bigz(number)
number2 <- paste(rep(2, 10), collapse = '')
y <- as.bigz(number2)
y / x
# Big Rational ('bigq') :
# [1] 2
x / y
# Big Rational ('bigq') :
# [1] 1/2

And it even supports vectors of large numbers:

as.bigz(c(number, number2))
# Big Integer ('bigz') object of length 2:
# [1] 1111111111 2222222222
2 Likes