abhi9u@lemmy.world to Technology@lemmy.worldEnglish · 6 months agoHow Python Compares Floats and Ints: When Equals Isn’t Really Equalblog.codingconfessions.comexternal-linkmessage-square17fedilinkarrow-up1114arrow-down17
arrow-up1107arrow-down1external-linkHow Python Compares Floats and Ints: When Equals Isn’t Really Equalblog.codingconfessions.comabhi9u@lemmy.world to Technology@lemmy.worldEnglish · 6 months agomessage-square17fedilink
minus-squareSylvartas@lemmy.worldlinkfedilinkEnglisharrow-up4·6 months agoThat makes sense, but then you’d just have people converting the int to a float manually and run into the exact same issues.
minus-square🇦🇺𝕄𝕦𝕟𝕥𝕖𝕕𝕔𝕣𝕠𝕔𝕕𝕚𝕝𝕖@lemm.eelinkfedilinkEnglisharrow-up4·6 months agoI mean honestly its expected u should check floats similarity not equivalence.
minus-squareSylvartas@lemmy.worldlinkfedilinkEnglisharrow-up5arrow-down1·6 months agoAgreed. But the less experienced programmers I know are surprisingly naive about this.
minus-square🇦🇺𝕄𝕦𝕟𝕥𝕖𝕕𝕔𝕣𝕠𝕔𝕕𝕚𝕝𝕖@lemm.eelinkfedilinkEnglisharrow-up3·6 months agoYeah its gonna be one of those problems chatgpt ain’t gonna help
That makes sense, but then you’d just have people converting the int to a float manually and run into the exact same issues.
I mean honestly its expected u should check floats similarity not equivalence.
Agreed. But the less experienced programmers I know are surprisingly naive about this.
Yeah its gonna be one of those problems chatgpt ain’t gonna help