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

Use math.fsum() in Composition for better accuracy #720

Merged
merged 2 commits into from Feb 6, 2024

Conversation

yut23
Copy link
Collaborator

@yut23 yut23 commented Feb 5, 2024

Using math.fsum() rather than the builtin sum() gives more accurate results, and is also consistent between Python versions. Python 3.12 improved the accuracy of sum(), which led to the tests for these notebooks failing.

Using math.fsum() rather than the builtin sum() gives more accurate
results, and is also consistent between Python versions. Python 3.12
improved the accuracy of sum(), which led to the tests for these
notebooks failing.
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@yut23 yut23 mentioned this pull request Feb 5, 2024
@zingale zingale merged commit 202bec8 into pynucastro:main Feb 6, 2024
9 checks passed
@yut23 yut23 deleted the composition-accuracy-improvements branch February 6, 2024 15:54
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.

None yet

2 participants