orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 6 个月前Peak code reuseeviltoast.orgimagemessage-square36fedilinkarrow-up1406arrow-down15
arrow-up1401arrow-down1imagePeak code reuseeviltoast.orgorhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 6 个月前message-square36fedilink
minus-squareRednax@lemmy.worldlinkfedilinkarrow-up3arrow-down2·6 个月前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·6 个月前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.