diff --git a/src/main/java/org/apache/commons/math/fraction/ProperFractionFormat.java b/src/main/java/org/apache/commons/math/fraction/ProperFractionFormat.java index 903733bc9..f25184bc8 100644 --- a/src/main/java/org/apache/commons/math/fraction/ProperFractionFormat.java +++ b/src/main/java/org/apache/commons/math/fraction/ProperFractionFormat.java @@ -215,7 +215,7 @@ public class ProperFractionFormat extends FractionFormat { int w = whole.intValue(); int n = num.intValue(); int d = den.intValue(); - return new Fraction(((Math.abs(w) * d) + n) * MathUtils.sign(w), d); + return new Fraction(((Math.abs(w) * d) + n) * MathUtils.copySign(1, w), d); } /**