TL;DR: Don't compare floats Problems Wrong test results Fragile tests Fail fast principle violation Solutions Avoid floats unless you have REAL performance concerns Use arbitrary precision numbers If you need to compare floats compare with t...

Markdown supported · ⌘↵ to post
No responses yet.