violet08_@lemmy.world to Lemmy Shitpost@lemmy.world · 3 days agowow😰lemmy.worldimagemessage-square40fedilinkarrow-up1314arrow-down112
arrow-up1302arrow-down1imagewow😰lemmy.worldviolet08_@lemmy.world to Lemmy Shitpost@lemmy.world · 3 days agomessage-square40fedilink
minus-squareneukenindekeuken@sh.itjust.workslinkfedilinkarrow-up37·edit-22 days agoInt underflow, but with a signed int32
minus-squarekkj@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up12·2 days ago-2,147,483,649, actually. A signed int32 can represent -1 just fine.
minus-squarekkj@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up4·2 days agoUnsigned jumps from 0 to 4,294,967,295. An overflow won’t get you to 2,147,483,647 unless you have a 31-bit uint for some reason.
minus-squarelad@programming.devlinkfedilinkEnglisharrow-up3·2 days agoHaving integers with amount of bits indivisible by 2, let alone 8, is a nice feature to have in a language, I deed
minus-squareValmond@lemmy.dbzer0.comlinkfedilinkarrow-up2·2 days agoint a:7; IIRC (C/C++). But doesn’t overflow as you’d expect.
Int underflow, but with a signed int32
So achtually -1 "
-2,147,483,649, actually. A signed int32 can represent -1 just fine.
Yeah, unsigned ofc.
Unsigned jumps from 0 to 4,294,967,295. An overflow won’t get you to 2,147,483,647 unless you have a 31-bit uint for some reason.
Having integers with amount of bits indivisible by 2, let alone 8, is a nice feature to have in a language, I deed
int a:7;
IIRC (C/C++). But doesn’t overflow as you’d expect.