Skip to content

Instantly share code, notes, and snippets.

@wesinator
Created March 26, 2020 10:53
Show Gist options
  • Save wesinator/74fea6db9b222584e1cc5c4cb2c2ebb7 to your computer and use it in GitHub Desktop.
Save wesinator/74fea6db9b222584e1cc5c4cb2c2ebb7 to your computer and use it in GitHub Desktop.
test proof that python math.floor() is equivalent to int()
import math
for i in range(0, 10000000):
f = i + 0.6
if math.floor(f) != int(f):
print("%.2f floor different from int conv" % f)
print(f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment