Skip to content

fix issue #362 a second time - #402

Merged
stijnh merged 1 commit into
masterfrom
fix_issue_362_again
Sep 11, 2026
Merged

fix issue #362 a second time#402
stijnh merged 1 commit into
masterfrom
fix_issue_362_again

Conversation

@benvanwerkhoven

Copy link
Copy Markdown
Collaborator

Due to a large merge, the issue of a runtime overflow warning in the dual_annealing strategy (issue #362) resurfaced.

This pull fixes the issue by replacing a hard coded sys.float_info.max in the get_result_cost function in util.py with a value passed as an argument. CostFunc is also adjusted to use pass its self.invalid_return_value to the get_result_cost function.

I've also added a test to make sure the issue does not resurface again.

@sonarqubecloud

Copy link
Copy Markdown

@stijnh
stijnh self-requested a review September 11, 2026 07:07

@stijnh stijnh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me! Good to have the test to ensure it does not resurface

@stijnh
stijnh merged commit 5d0d9e9 into master Sep 11, 2026
4 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.

2 participants