Created
March 26, 2020 10:53
-
-
Save wesinator/74fea6db9b222584e1cc5c4cb2c2ebb7 to your computer and use it in GitHub Desktop.
test proof that python math.floor() is equivalent to int()
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
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