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

Improve accuracy of quartic_roots #1056

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Improve accuracy of quartic_roots #1056

merged 1 commit into from
Nov 27, 2023

Conversation

NAThompson
Copy link
Collaborator

Previously, we took a square root, and then squared it later in the computation. In Issue #1055, we observed that this caused enough loss of accuracy to prevent finding real roots.

Use the original value, instead of squaring the square root.

Previously, we took a square root, and then squared it later in the computation.
In Issue #1055, we observed that this caused enough loss of accuracy to prevent finding real roots.

Use the original value, instead of squaring the square root.
Copy link
Member

@mborland mborland left a comment

Choose a reason for hiding this comment

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

This looks good to me. The only error in CI is a personal favorite:

====== BEGIN OUTPUT ======
Running 1 test case...
Default hardware concurrency = 2
terminate called after throwing an instance of 'std::domain_error'
  what():  You have done something wrong.

Testing that a reasonable action is performed by the Monte-Carlo integrator when the integrand throws an exception on type float
unknown location(0): fatal error: in "naive_monte_carlo_test": signal: SIGABRT (application abort requested)
naive_monte_carlo_test.cpp(457): last checkpoint: "naive_monte_carlo_test" test entry

*** 1 failure is detected in the test module "naive_monte_carlo_test"

EXIT STATUS: 201
====== END OUTPUT ======

@NAThompson
Copy link
Collaborator Author

@mborland : Someday I'll fix that one . . .

@wztzjhn: Fixed on develop.

@mborland mborland linked an issue Nov 27, 2023 that may be closed by this pull request
@mborland mborland merged commit e0c17f6 into develop Nov 27, 2023
60 of 61 checks passed
@mborland mborland deleted the issue_1055 branch November 27, 2023 16:53
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.

incorrect quartic root solver
2 participants