Skip to content

Commit

Permalink
better coverage for irrational fractions equality comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
ohhmm committed Feb 14, 2025
1 parent ab6287b commit 198143f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions omnn/math/Fraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ using namespace omnn::math;
auto bothAreRational = (IsRational() && fraction.IsRational()) == YesNoMaybe::Yes;
if (bothAreRational) {
equal = operator a_rational() == static_cast<a_rational>(fraction);
} else { // TODO: FIXME: both irrationals hangs on macos
//OptimizeOn on;
//equal = numerator() * fraction.denominator() == fraction.numerator() * denominator();
} else { // both are irrational
OptimizeOn on;
equal = numerator() * fraction.denominator() == fraction.numerator() * denominator();
}
}
}
Expand Down

0 comments on commit 198143f

Please sign in to comment.