Skip to content
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

Fix bsearch to never return the right endpoint (in case we can't-split) #867

Merged
merged 1 commit into from
Jun 29, 2024

Conversation

pavpanchekha
Copy link
Contributor

Fix #840. This was a very subtle bug. Basically, suppose regimes narrows our split point to somewhere in [a, b], but also suppose we can't split after b. Then bsearch picks something in [a, b]. But it can't be b! So now we check for b and in that case return a.

@pavpanchekha pavpanchekha merged commit 2aadce8 into main Jun 29, 2024
12 checks passed
@pavpanchekha pavpanchekha deleted the fix-regimes-can-split branch June 29, 2024 20:56
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.

Herbie doesn't know that cos(x) <= 1
1 participant