-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature/disco #20
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.