diff --git a/projects/Math/91/org/apache/commons/math/fraction/Fraction.java b/projects/Math/91/org/apache/commons/math/fraction/Fraction.java index 0706f8c..d6d2f18 100644 --- a/projects/Math/91/org/apache/commons/math/fraction/Fraction.java +++ b/projects/Math/91/org/apache/commons/math/fraction/Fraction.java @@ -256,8 +256,8 @@ public Fraction abs() { * than object, 0 if they are equal. */ public int compareTo(Fraction object) { - double nOd = doubleValue(); - double dOn = object.doubleValue(); + long nOd = ((long) numerator) * object.denominator; + long dOn = ((long) denominator) * object.numerator; return (nOd < dOn) ? -1 : ((nOd > dOn) ? +1 : 0); }