daily pastebin goal
30%
SHARE
TWEET

Untitled

a guest Dec 10th, 2011 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int rem3(unsigned n) {
  2.    n = (n >> 16) + (n & 0xFFFF);
  3.    n = (n >>  8) + (n & 0x00FF);
  4.    n = (n >>  4) + (n & 0x000F);
  5.    n = (n >>  2) + (n & 0x0003);
  6.    n = (n >>  2) + (n & 0x0003);
  7.    return (0x0924 >> (n << 1)) & 3;
  8. }
  9.  
  10. int rem5(unsigned n) {
  11.    n = (n >> 16) + (n & 0xFFFF);
  12.    n = (n >>  8) + (n & 0x00FF);
  13.    n = (n >>  4) + (n & 0x000F);
  14.    n = (n >>  4) - ((n >> 2) & 3) + (n & 3);
  15.    return (01043210432 >> 3 * (n + 3)) & 7;
  16. }
  17.  
  18.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top