Ruby Quiz One Liners
It reminds me of the bitwise assignments in CS class, except in Ruby so it’s easier to read than stuff like this:
return ((x >> 1) + (~((x>>1) & (2 << 30))+1)) >> (n + (~1 +1));
December 11, 2008
It reminds me of the bitwise assignments in CS class, except in Ruby so it’s easier to read than stuff like this:
return ((x >> 1) + (~((x>>1) & (2 << 30))+1)) >> (n + (~1 +1));
December 11, 2008