bigq {gmp} | R Documentation |
Type class supporting arithmetic operations on very large rationals.
as.bigq(n, d = 1) as.character.bigq(a,b=10) as.double.bigq(x,...) as.bigz.bigq(a,mod=NA) is.na.bigq(a) print.bigq(x,...) denominator(x) numerator(x)
a,n,d |
Either integer, numeric or string value
(String value: ither starting with 0x for hexadecimal, 0b for
binary or without prefix for decimal values.
Any format error results in 0 ) |
mod |
Optional modulus to convert into biginteger |
x |
Numeric value |
b |
Base: from 2 to 32 |
... |
Additional parameters |
A bigq class representing the parameter value.
Antoine Lucas
http://mulcyber.toulouse.inra.fr/projects/gmp/
x <- as.bigq(21,6) x # 7 / 2 # Wow ! result is simplify. y <- as.bigq(5,3) # addition work ! x + y # You can even try multiplication, division... x * y / 13 # convert to string, double as.character(x) as.double(x)