tfm@europe.pub to Programmer Humor@lemmy.mlEnglish · 5 days agoPython!lemmy.mlexternal-linkmessage-square58fedilinkarrow-up1723arrow-down117
arrow-up1706arrow-down1external-linkPython!lemmy.mltfm@europe.pub to Programmer Humor@lemmy.mlEnglish · 5 days agomessage-square58fedilink
minus-squareOriel Jutty :hhHHHAAAH:@infosec.exchangelinkfedilinkarrow-up7arrow-down1·4 days ago$ python3 -c 'f = (lambda x: x + 0.5 - 0.5); print(f(2**52))' 4503599627370495.5 #python
minus-squareCevilia (she/they/…)@lemmy.blahaj.zonelinkfedilinkEnglisharrow-up11·4 days agoAhh, contrived examples of floating point errors. I haven’t seen those since I asked Javascript to add 0.1 and 0.2 :)
$ python3 -c 'f = (lambda x: x + 0.5 - 0.5); print(f(2**52))' 4503599627370495.5
#python
Ahh, contrived examples of floating point errors. I haven’t seen those since I asked Javascript to add 0.1 and 0.2 :)