PosRationals: Set of Positive Rational Numbers

Description Details Super classes Methods See Also

Description

The mathematical set of positive rational numbers, defined as the set of numbers that can be written as a fraction of two integers and are non-negative. i.e.

p/q : p,q ε Z, p/q ≥ 0, q != 0

where Z is the set of integers.

Details

The $contains method does not work for the set of Rationals as it is notoriously difficult/impossible to find an algorithm for determining if any given number is rational or not. Furthermore, computers must truncate all irrational numbers to rational numbers.

Super classes

set6::Set -> set6::Interval -> set6::SpecialSet -> set6::Rationals -> PosRationals

Methods

Public methods

Inherited methods

Method new()

Create a new PosRationals object.

Usage
PosRationals$new(zero = FALSE)
Arguments
zero

logical. If TRUE, zero is included in the set.

Returns

A new PosRationals object.


Method clone()

The objects of this class are cloneable with this method.

Usage
PosRationals$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other special sets: Complex, ExtendedReals, Integers, Logicals, Naturals, NegIntegers, NegRationals, NegReals, PosIntegers, PosNaturals, PosReals, Rationals, Reals, Universal


set6 documentation built on Oct. 18, 2021, 5:06 p.m.