>>> 0.1 + 0.2 == 0.3 | |
False | |
>>> def compare(a, b, epsilon=0.00001): | |
... return abs(a - b) < epsilon | |
... | |
>>> compare(0.1 + 0.2, 0.3) | |
True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment