Bigq operators {gmp}R Documentation

Basic arithmetic operators for large rationals

Description

Addition, substraction, multiplication, division.

Usage

add.bigq(a, b)
sub.bigq(a, b=NULL)
mul.bigq(a, b)
div.bigq(a, b)
abs.bigq(x)

Arguments

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

Details

Operators can be use directly when objects are of class bigq: a + b, a * b, etc.

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.4-11 Index]