The number package supports infinite-precision integer and rational numbers. All numbers are subtypes of the interface Number (not to be confused with Java's Number class). All instances of Number are immutable. An integer number must implement the IntegerNumber interface. A rational number must implement the RationalNumber interface. The integers and rationals are disjoint sets. A NumberFactory provides methods to create numbers, as well as operations such as addition, subtraction, and so on.