nzmath.rational

RationalField class

RationalField is a class of field of rationals. The class has the single instance 'theRationalField'.

superclass: nzmath.ring.QuotientField

constructor

RationalField()

Create an instance of RationalField. You may not want to create an instance, since there is already theRationalField.

methods

classNumber()

Return 1, since the class number of the rational field is one.

createElement(numerator, [denominator])

Create a Rational object. If the number of arguments is one, it must be an integer or a rational. If the number of arguments is two, they must be integers.

getQuotientField()

Return the rational field itself.

issubring(other)

Report whether another ring contains the rational field as subring.
If other is also the rational field, the output is True. If other is the integer ring, the output is False. In other cases it depends on the implementation of another ring's issuperring method.

issuperring(other)

Report whether the rational number field contains another ring as subring.
If other is also the rational number field or the ring of integer, the output is True. In other cases it depends on the implementation of another ring's issubring method.

Method inherited from nzmath.ring.QuotientField

gcd, isfield

Method inherited from nzmath.ring.CommutativeRing

isdomain, iseuclidean, isnoetherian, ispid, isufd

Operators

in, str

Properties

(These properties are new in 0.4.1)


Last-modified: 2005-09-28 (¿å) 13:50:47