MathLib.Rational()

MathLib.Rational is MathLib's implementation of rational numbers. The function expects two arguments (the numerator and the denominator) or one argument (the numerator and the denominator is set to 1). \[ \text{MathLib.Rational}(a, b) = \frac{a}{b} \]

Methods

For a list of properties and methods common to all Rational numbers please see the documentation page for the Rational.prototype.
.toContentMathML()
Returns a content MathML string representation of the rational field.
.toLaTeX()
Returns a LaTeX string representation of the rational field.
.toMathML()
Returns a presentation MathML string representation of the rational field.
.toString()
Returns a string representation of the rational field.