Skip to content

Instantly share code, notes, and snippets.

@taojy123
Last active August 1, 2018 06:45
Show Gist options
  • Save taojy123/af6334f1a1dd539bd167431ced42e0ce to your computer and use it in GitHub Desktop.
Save taojy123/af6334f1a1dd539bd167431ced42e0ce to your computer and use it in GitHub Desktop.
python 浮点精度示例
assert 0.1 + 0.2 == 0.30000000000000004
assert 0.3 - 0.2 == 0.09999999999999998
assert 5.06 * 100 == 505.99999999999994
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment