orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 3 个月前Peak code reuseeviltoast.orgimagemessage-square41linkfedilinkarrow-up1467arrow-down16
arrow-up1461arrow-down1imagePeak code reuseeviltoast.orgorhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 3 个月前message-square41linkfedilink
minus-squareRednax@lemmy.worldlinkfedilinkarrow-up3arrow-down2·3 个月前Why the complicated if statements to check the sign? Just let the number overflow. Would be functionaly the same, and result in much prettier code.
minus-squarecogman@lemmy.worldlinkfedilinkarrow-up6·3 个月前That’s a platform dependent change. Overflow is undefined behavior. I’d rather have my code portable so it can run on my Univac 1101.
Why the complicated if statements to check the sign? Just let the number overflow. Would be functionaly the same, and result in much prettier code.
That’s a platform dependent change. Overflow is undefined behavior. I’d rather have my code portable so it can run on my Univac 1101.