Construct a rational number from a String of the form "12.
Construct a rational number from a String of the form "12.3E+7".
the given String representation of a number
http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html #BigDecimal%28java.lang.String%29
Construct a rational number from a tuple of two Longs.
Construct a rational number from a tuple of two Longs.
the tuple of two Longs
the numerator
the denominator
Multiply a rational number times a long.
Multiply a rational number times a long.
multiply this times long l
Multiply two rational numbers (this * q).
Multiply two rational numbers (this * q).
multiply this times rational q
Add a rational number plus a long.
Add a rational number plus a long.
add long l to this
Add two rational numbers (this + q)
Add two rational numbers (this + q)
add rational q to this
Subtract: a rational number minus a long.
Subtract: a rational number minus a long.
subtract long l from this
Subtract two rational numbers (this - q).
Subtract two rational numbers (this - q).
subtract rational q from this
Divide a rational number div a long.
Divide a rational number div a long.
divide this by long l
Divide two rational numbers (this / q)
Divide two rational numbers (this / q)
divide this by rational q
Return the absolute value of this rational number.
Compare this rational number with that rational number q.
Compare this rational number with that rational number q.
that rational number
Compare two rational numbers (negative for <, zero for ==, positive for >).
Compare two rational numbers (negative for <, zero for ==, positive for >).
the first rational number to compare
the second rational number to compare
the denominator
Override equals to determine whether this rational number equals rational c.
Override equals to determine whether this rational number equals rational c.
the rational number to compare with this
Create a rational number from a BigDecimal number.
Create a rational number from a BigDecimal number.
the BigDecimal used to create the rational number
Create a rational number from a Double.
Create a rational number from a Double.
the Double used to create the rational number
Create a rational number from a Float.
Create a rational number from a Float.
the Float used to create the rational number
Create a rational number from an Int.
Create a rational number from an Int.
the Int used to create the rational number
Create a rational number from a Long.
Create a rational number from a Long.
the Long used to create the rational number
Must also override hashCode to be be compatible with equals.
Must also override hashCode to be be compatible with equals.
Determine whether this rational number is integral.
Return the maximum of this and that rational numbers.
Return the maximum of this and that rational numbers.
that rational number to compare with this
Return the minimum of this and that rational numbers.
Return the minimum of this and that rational numbers.
that rational number to compare with this
the numerator
Reduce the mangnitude of the numerator and denonimator by dividing both by their Greatest Common Divisor (GCD).
Return the square root of that rational number.
Convert that/this rational number to a BigDecimal number.
Convert that/this rational number to a BigDecimal number.
that rational number to convert
Convert that/this rational number to a Double.
Convert that/this rational number to a Double.
that rational number to convert
Convert that/this rational number to a Float.
Convert that/this rational number to a Float.
that rational number to convert
Convert that/this rational number to an Int.
Convert that/this rational number to an Int.
that rational number to convert
Convert this rational number to a Long.
Convert this rational number to a Long.
that rational number to convert
Convert this rational number to a String.
Convert this rational number to a String.
Compute the unary minus (-).
Raise a rational number to the l-th power.
Raise a rational number to the l-th power.
the long power/exponent
Raise a rational number to the q-th power.
Raise a rational number to the q-th power.
the rational power/exponent
This class is used to represent rational numbers as 2 long integers. (a, b), e.g., (2, 3) meaning 2 / 3. Arbitrary rational number can be created without loss of precision via the two constructors or the fromBigDecimal method.
the numerator
the denominator