orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 1 day agoPeak code reuseeviltoast.orgimagemessage-square41fedilinkarrow-up1440arrow-down15
arrow-up1435arrow-down1imagePeak code reuseeviltoast.orgorhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 1 day agomessage-square41fedilink
minus-squareRednax@lemmy.worldlinkfedilinkarrow-up3arrow-down2·17 hours agoWhy 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·17 hours agoThat’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.