Class RationalWithInfinity

java.lang.Object
java.lang.Number
com.singularsys.extensions.field.implementations.RationalWithInfinity
All Implemented Interfaces:
Serializable, Comparable<RationalWithInfinity>

public class RationalWithInfinity extends Number implements Comparable<RationalWithInfinity>
A rational number represented as the quotient of two BigIntegers. An immutable type.

Note if using Rational numbers with the PrintVisitor a special rule RationalDivisionPrintRule is needed to ensure divisions are correctly printed. This can be added with

 jep.getPrintVisitor().addSpecialRule(jep.getOperatorTable().getDivide(),
                        new RationalDivisionPrintRule());
 
See Also: