daily pastebin goal
89%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int v = 30000; // 32-bit word to find the log base 2 of
  2. int r = 0; // r will be lg(v)
  3.  
  4. while ( (v >>= 1) != 0) // unroll for more speed...
  5. {
  6.   r++;
  7. }
  8.    
  9. Math.Floor(Math.Log(30000, 2)) + 1
  10.    
  11. (int) Math.Log(30000, 2) + 1
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