Bigq operators {gmp}R Documentation

Basic arithmetic operators for large rationals

Description

Addition, substraction, multiplication, division.

Usage

add.bigq(a, b)
a + b (if a or b is a bigq vector)
sub.bigq(a, b=NULL)
a - b (if a or b is a bigq vector)
mul.bigq(a, b)
a * b (if a or b is a bigq vector)
div.bigq(a, b)
a / b (if a or b is a bigq vector)
abs.bigq(a)

Arguments

a,b bigq, integer or string from an integer
... Additional parameters

Details

Value

A bigq class representing the result of the arithmetic operation.

Author(s)

Immanuel Scholz and Antoine Lucas

References

http://mulcyber.toulouse.inra.fr/projects/gmp/

Examples

# 1/3+1=4/3
as.bigq(1,3) + 1


[Package gmp version 0.3-1 Index]