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

Problem with numerical accuracy in Grid::evolve and Grid::evolve_info #223

Closed
cschwan opened this issue Mar 30, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@cschwan
Copy link
Contributor

cschwan commented Mar 30, 2023

This continues the observation from NNPDF/pineko#72 (comment):

There are in fact three values similar to each other in the imported grid:

  1. 0.0033523339485467950
  2. 0.0033523339485468126
  3. 0.0033523339485468304

What happens is that (1) is close (less than 64 ULPS) to (2), and (2) is close to (3), but (1) isn't close to (3). Mathematically speaking numerical equality with a tolerance interval isn't transitive. Because of that probably (1) and (2) are removed here

pineappl/pineappl/src/grid.rs

Lines 1808 to 1809 in f2152da

x1.sort_by(f64::total_cmp);
x1.dedup_by(|a, b| approx_eq!(f64, *a, *b, ulps = 64));

and (3) is the representative value chosen by Grid::evolve_info, but then Grid::evolve can't find (1) using the same tolerance, because the distance of (1) to (3) is up to two times the tolerance.

@cschwan cschwan added the bug Something isn't working label Mar 30, 2023
@cschwan cschwan self-assigned this Mar 30, 2023
@cschwan cschwan added this to the v0.6.0 milestone Mar 30, 2023
@cschwan
Copy link
Contributor Author

cschwan commented Mar 30, 2023

Should be fixed with commit 39c52ae.

@cschwan
Copy link
Contributor Author

cschwan commented Mar 30, 2023

According to NNPDF/pineko#72 (comment) it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant