MFlowCode / MFC

Exascale simulation of multiphase/physics fluid dynamics
https://mflowcode.github.io
MIT License
132 stars 56 forks source link

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

Closed ChrisZYJ closed 6 days ago

ChrisZYJ commented 1 week ago

== 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 commented 1 week ago

related to #488