Skip to content

Commit

Permalink
fixed files form Lang #49
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent a745eb7 commit fef3a2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions projects/Lang/49/org/apache/commons/lang/math/Fraction.java
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,9 @@ public double doubleValue() {
* @return a new reduced fraction instance, or this if no simplification possible
*/
public Fraction reduce() {
if (numerator == 0) {
return equals(ZERO) ? this : ZERO;
}
int gcd = greatestCommonDivisor(Math.abs(numerator), denominator);
if (gcd == 1) {
return this;
Expand Down

0 comments on commit fef3a2c

Please sign in to comment.