abhi9u@lemmy.world to Technology@lemmy.worldEnglish · 5 months agoHow Python Compares Floats and Ints: When Equals Isn’t Really Equalblog.codingconfessions.comexternal-linkmessage-square43fedilinkarrow-up1142arrow-down19
arrow-up1133arrow-down1external-linkHow Python Compares Floats and Ints: When Equals Isn’t Really Equalblog.codingconfessions.comabhi9u@lemmy.world to Technology@lemmy.worldEnglish · 5 months agomessage-square43fedilink
minus-squareCethin@lemmy.ziplinkfedilinkEnglisharrow-up6arrow-down1·5 months agoComparing is fine, but it should be fuzzy. Less than and greater than are fine, so you basically should only be checking for withing a range of values, not a specific value.
Comparing is fine, but it should be fuzzy. Less than and greater than are fine, so you basically should only be checking for withing a range of values, not a specific value.