Created
May 1, 2020 14:10
-
-
Save raeq/5789c86913f3cf485cd82d71245929ae to your computer and use it in GitHub Desktop.
Floating point errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value:float = 0.0 | |
for n in range(10): | |
value+=0.1 | |
print(f"The current sum is: {value}") | |
assert value == 1.0, ("The value is not equal to 1.0") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment