Skip to content

Fix vec_proxy_compare() example #1977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lbm364dl
Copy link
Contributor

When introducing custom implementation of vec_proxy_compare(), the example rational(2, 4) < rational(2, 3) was used as a case where we would get a FALSE result. This actually rendered TRUE, because of fallback to vec_proxy_equal(), which uses the irreducible fraction, so it was actually equivalent to rational(1, 2) < rational(2, 3), which is TRUE even lexicographically. This example was thus misleading, and I changed it to rational(2, 5) < rational(2, 3), which correctly showcases the problem.

I also added an additional paragraph warning about floating point precision when using the double representation as a proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant