## Get the complete factorization of a single number
divisorsBig(100)
## Or get the complete factorization of many numbers
set.seed(29)
myVec <- sample(-1000000:1000000, 1000)
system.time(myFacs <- divisorsBig(myVec))
## Return named list
myFacsWithNames <- divisorsBig(myVec, namedList = TRUE)
## Get the complete factorization for a large semiprime
big = gmp::prod.bigz(gmp::nextprime(gmp::urand.bigz(2, size = 65, seed = 3)))
divisorsBig(big)
Run the code above in your browser using DataLab