Zero (0) as a Rational number
One (1) as a Rational number
One in BigDecimal
Negative one (-1) as a Rational number
Return the absolute value of that rational number.
Return the absolute value of that rational number.
that rational number
Create a rational number from its primary string representation "a/b".
Create a rational number from its primary string representation "a/b". Examples: "2/3", "2".
the string form of a rational number
Create a rational number from a pair (Tuple2) of Longs.
Create a rational number from a pair (Tuple2) of Longs.
the tuple form of a rational number
Create a rational number from its secondary string representation "(a, b)".
Create a rational number from its secondary string representation "(a, b)". Examples: "(2, 3)", "(2, 1)".
the string form of a rational number
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 Double.
Create a rational number from a Double. FIX: if den not a power of 2, it goes to md.
the double used to create the rational number.
the maximum denominator
http://rosettacode.org/wiki/Convert_decimal_number_to_rational
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 integer 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.
Determine the numerator and denonimator of the closest rational number to the given BigDecimal number.
Determine the numerator and denonimator of the closest rational number to the given BigDecimal number.
the BigDecimal used to create the rational number
the maximum denominator
Determine the numerator and denonimator of the closest rational number to the given BigDecimal number.
Determine the numerator and denonimator of the closest rational number to the given BigDecimal number.
the double used to create the rational number
the maximum denominator
http://stackoverflow.com/questions/5124743/algorithm-for-simplifying- decimal-to-fractions/5128558#5128558
Make a rational number from a String of the form "12.
Make 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
Denominator (2 ~^ 54) big enough to capture largest Double significand (53 bits)
Ordering for rational numbers.
Return the square root of that rational number.
Return the square root of that rational number.
that rational number
The
Rational
companion object defines the origin (zero), one and minus one as well as some utility functions.