Basic arithmetic operators for large rationals
Addition, subtraction, multiplication, division, and absolute value for
large rationals, i.e. "bigq"
class R objects.
add.bigq(e1, e2) ## S3 method for class 'bigq' e1 + e2 sub.bigq(e1, e2=NULL) ## S3 method for class 'bigq' e1 - e2 mul.bigq(e1, e2) ## S3 method for class 'bigq' e1 * e2 div.bigq(e1, e2) ## S3 method for class 'bigq' e1 / e2 ## S3 method for class 'bigq' e1 ^ e2 ## S3 method for class 'bigq' abs(x)
e1,e2, x |
of class |
A bigq class representing the result of the arithmetic operation.
Immanuel Scholz and Antoine Lucas
## 1/3 + 1 = 4/3 : as.bigq(1,3) + 1 r <- as.bigq(12, 47) stopifnot(r ^ 3 == r*r*r)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.