Interface RationalNumber

All Superinterfaces:
Comparable<Number>, Number

public interface RationalNumber extends Number
An instance of this class represents a rational number.
  • Method Details

    • numerator

      BigInteger numerator()
      Returns the numerator from a representation of this rational number as the quotient of two Java BigIntegers.
      If this number is infinite, it will return null;
      Returns:
      the numerator as a BigInteger
    • denominator

      BigInteger denominator()
      Returns the denominator from a representation of this rational number as the quotient of two Java BigIntegers.
      If this number is infinite, it will return null;
      Returns:
      the denominator as a BigInteger