violet08_@lemmy.world to Lemmy Shitpost@lemmy.world · 2 days agowow😰lemmy.worldimagemessage-square39linkfedilinkarrow-up1300arrow-down112
arrow-up1288arrow-down1imagewow😰lemmy.worldviolet08_@lemmy.world to Lemmy Shitpost@lemmy.world · 2 days agomessage-square39linkfedilink
minus-squareneukenindekeuken@sh.itjust.workslinkfedilinkarrow-up36·edit-21 day agoInt underflow, but with a signed int32
minus-squarekkj@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up12·1 day ago-2,147,483,649, actually. A signed int32 can represent -1 just fine.
minus-squarekkj@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up4·1 day 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·1 day 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·12 hours 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.