Conversation
198143f to
41f8efa
Compare
d6b749b to
63c3257
Compare
Comment on lines
+78
to
+84
| 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(); |
Contributor
There was a problem hiding this comment.
Performance and Documentation Concerns:
-
The code was previously commented out with a note about hanging on macOS (
// TODO: FIXME: both irrationals hangs on macos). While enabling this code improves coverage for irrational fractions equality comparison, there's no explanation of why it's now safe to enable or what testing was done to verify it works correctly on macOS. -
The PR enables previously disabled code without adding any documentation explaining the change. This makes it difficult for future developers to understand why this code was previously problematic and what has changed to make it work now.
Recommendation:
- Add documentation or comments explaining what changes have been made to resolve the hanging issue
- Add information about what testing has been performed to verify this code now works correctly on all platforms including macOS
- Consider adding unit tests that specifically verify this functionality works as expected
07256bf to
b4aad0d
Compare
e2ce1b3 to
ea6e896
Compare
76d7803 to
61632e7
Compare
f2b3b27 to
2486d0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
better coverage for irrational fractions equality comparison