Basic operations for working with large integers. The bignum
function converts a positive integer, string or raw vector into a bignum type.
All basic Arithmetic and Comparison operators such as
+, -, *, ^, %%, %/%, ==,
!=, <, <=, > and >= are implemented for
bignum objects. The
Modular exponent
(a^b %% m) can be calculated using bignum_mod_exp()
when b is too large for calculating a^b directly.
bignum(x, hex = FALSE)
bignum_mod_exp(a, b, m)
bignum_mod_inv(a, m)