bigz operators {gmp} | R Documentation |
Addition, substraction, multiplication, division, remainder of division, multiplicative inverse, power and logarithm functions.
add.bigz(a, b) sub.bigz(a, b = NULL) mul.bigz(a, b) div.bigz(a, b) divq.bigz(a,b) mod.bigz(a, b) abs.bigz(x) inv.bigz(a, b,...) inv(a, ...) pow.bigz(a, b,...) pow(a, ...) log.bigz(x, base=exp(1)) log2.bigz(a) log10.bigz(a)
x |
bigz, integer or string from an integer |
a |
bigz, integer or string from an integer |
b |
bigz, integer or string from an integer |
base |
base of the logarithm; base e as default |
... |
Additional parameters |
For details about the internal modulus state, see the manpage of "bigz".
div or "/" return a rational number; divq or "%/%" return the quotient of division.
Operators can be use directly when objects are of class bigz: a + b, log(a), etc.
A bigz class representing the result of the arithmetic operation.
Immanuel Scholz and Antoine Lucas
Gnu MP Library see http://swox.com/gmp
# 1+1=2 as.bigz(1) + 1 # if my_large_number_string is set to a number, it returns the least byte ## Not run: mod.bigz(as.bigz(my_large_number_string),"0xff") ## End(Not run) # power exponents can be up to MAX_INT in size, or unlimited if a # bigz's modulus is set. pow.bigz(10,10000)