Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ question

Name: Anonymous 2013-05-09 18:42

I feel like I want to write
i *= 2;
rather than
i << 1;

Is this natural for young kids my age? (+18)

Name: Anonymous 2013-05-09 21:18

Also, if N is a power of two,
n &= (N-1);
might be faster than
n %= N;
or, in languages like C99 where the sign of modulo is that of the dividend, which is completely stupid and counter-intuitive:
n = -((n % N) % -N)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List