Skip to content

Instantly share code, notes, and snippets.

@raeq
Created May 1, 2020 14:10
Show Gist options
  • Save raeq/5789c86913f3cf485cd82d71245929ae to your computer and use it in GitHub Desktop.
Save raeq/5789c86913f3cf485cd82d71245929ae to your computer and use it in GitHub Desktop.
Floating point errors.
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