Skip to content

Implement the Cohen-Hubbard-Oesterwinter method #1734

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

Merged
merged 4 commits into from
Feb 25, 2018

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Feb 25, 2018

This brings significant improvements in accuracy and in speed:
Before:

---------------------------------------------------------------------------------
Benchmark                                          Time           CPU Iterations
---------------------------------------------------------------------------------
BM_EphemerisSolarSystemMajorBodiesOnly/-3 90719773589 ns 90371379300 ns          1 +9.92179030813603147e-01 ua

After:

---------------------------------------------------------------------------------
Benchmark                                          Time           CPU Iterations
---------------------------------------------------------------------------------
BM_EphemerisSolarSystemMajorBodiesOnly/-3 55156286341 ns 54912352000 ns          1 +9.92179030813603147e-01 ua

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
#endif
double const v_convergence_order = Slope(log_step_sizes, log_p_errors);
double const v_correlation =
PearsonProductMomentCorrelationCoefficient(log_step_sizes, log_p_errors);
LOG(INFO) << "Convergence order in p : " << v_convergence_order;
LOG(INFO) << "Correlation : " << v_correlation;
#if !defined(_DEBUG)
EXPECT_THAT(RelativeError(integrator.order, v_convergence_order), Lt(0.035));
EXPECT_THAT(v_correlation, IsNear(1.0, /*tolerance=*/1.02));
EXPECT_THAT(RelativeError(integrator.order, v_convergence_order), Lt(0.02));
Copy link
Member

Choose a reason for hiding this comment

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

Should the matcher be IsNear rather than Lt here and above?

Copy link
Member Author

Choose a reason for hiding this comment

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

As discussed, this doesn't work too well.

@eggrobin eggrobin added the LGTM label Feb 25, 2018
@pleroy pleroy merged commit 41def18 into mockingbirdnest:master Feb 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants