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 machine precision bug in DoglegOptimizerImpl::ComputeBlend #1864

Merged

Conversation

DanMcGann
Copy link
Contributor

Fixes #1861

This commit fixes a bug that could cause the incorrect solution to be returned from DoglegOptimizerImpl::ComputeBlend that is documented in Issue #1861.

The fix incorporates machine precision epsilon using std::numeric_limits into the bounds checks that determine which solution is returned from the quadratic documented in doc/trustregion.pdf. This should ensure that the correct solution is returned regardless of machine prevision errors.

This PR also adds a test for the edgecases that are know to cause the bug on some machines.

@ProfFan ProfFan self-assigned this Oct 8, 2024
@DanMcGann DanMcGann force-pushed the bugfix/dogleg_compute_blend branch 3 times, most recently from 2cdb76c to 09d8d72 Compare October 8, 2024 15:25
This commit fixes a bug that could cause the incorrect solution to be
returned from ComputeBlend that is documented in Issue borglab#1861.
Copy link
Collaborator

@varunagrawal varunagrawal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks Dan!

@varunagrawal varunagrawal merged commit c97b9a9 into borglab:develop Oct 8, 2024
33 checks passed
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.

Edge Case Bug in iSAM2 when using DogLeg Optimization
3 participants