Sentient Loom to Lemmy ShitpostEnglish • 1 month agoDon't tell me what to dosh.itjust.worksimagemessage-square19fedilinkarrow-up1139arrow-down15
arrow-up1134arrow-down1imageDon't tell me what to dosh.itjust.worksSentient Loom to Lemmy ShitpostEnglish • 1 month agomessage-square19fedilink
minus-square@Snazzlink5•edit-21 month agoThere are only 4.29 billion possible values of an int32, so even if you used 2 lines for each case, it’d still be under 10 billion lines of code bool isOdd(int num) { if (num == 1) { return true; } if (num == 2) { return false; } if (num == 3) { return true; } … }
There are only 4.29 billion possible values of an int32, so even if you used 2 lines for each case, it’d still be under 10 billion lines of code
bool isOdd(int num) { if (num == 1) { return true; } if (num == 2) { return false; } if (num == 3) { return true; } … }
okay but what about an
int512
?