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

Feature/disco #20

Merged
merged 47 commits into from
Apr 23, 2024
Merged

Feature/disco #20

merged 47 commits into from
Apr 23, 2024

Conversation

whaeck
Copy link
Member

@whaeck whaeck commented Apr 9, 2024

This adds a rewrite of the original disco library in the tools library. One of the reasons for integrating this into into the tools library is to reduce the number of dependencies in the njoy libraries. This effectively replaces a larger number of dependencies to a single one (previously we had Log, disco, range-v3 which are now replaced by a single tools dependency).

Another reason for the update to disco was to use std::from_chars instead of the original disco floating point parsers. The original parsers had a tendency to be "off" by a very small epsilon. For example: "1.0000000000E-11" got interpreted as 9.99999999999e-12 or 2.00000000E+00 as 1.9999999999999. That was a problem.
We opted to use the fast_float::from_chars function instead of the std::from_chars since not every compiler/standard library properly implemented the from_chars function (LLVM and clang do not have the floating point version of from_chars). The fast_float library is actively maintained and is the implementation used in gcc-12 for from_chars, hence we adopted that implementation.

The original disco interface is maintained so the impact on ENDFtk and ACEtk will be minimal. We expect performance improvements and fixing the above mentioned issue when this version of tools gets integrated into ACEtk and ENDFtk.

Base automatically changed from feature/std-ranges-part9 to develop April 22, 2024 21:34
@whaeck whaeck mentioned this pull request Apr 23, 2024
@whaeck whaeck merged commit 8ee21f4 into develop Apr 23, 2024
16 checks passed
@whaeck whaeck deleted the feature/disco branch April 23, 2024 16:24
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