-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Floating point equality - revisited #703
Copy link
Copy link
Closed
Labels
documentationkind: questionsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
documentationkind: questionsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
This is related to #185. I know that comparing floats implementation is a delicate subject, but the current behavior can be improved.
Suppose this code (suppose no errors occurs):
When the float properties are compared, the result is false which is not what I was expecting.
this comparison translates to 3.123f as:
lhs = 3.1229999065399201
rhs = 3.122999906539917
Tested both on Ubuntu 17.04 & macOS Sierra with same results.