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

replace checks that see if two float variables are equal via == with something resiliant to floating point errors/roundoff #482

Closed
ChrisZYJ opened this issue Jun 22, 2024 · 1 comment · Fixed by #488
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ChrisZYJ
Copy link
Contributor

ChrisZYJ commented Jun 22, 2024

== is used to compare floating point numbers in a few places, like:

elseif (polydisperse .and. (poly_sigma == dflt_real)) then

SHB addendum: Equality checks of floats against floats is bad practice and fragile. Replace with something more robust.

@sbryngelson sbryngelson added enhancement New feature or request good first issue Good for newcomers labels Jun 22, 2024
@sbryngelson
Copy link
Member

related to #488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Development

Successfully merging a pull request may close this issue.

2 participants