Timeline for Base-2 integer logarithm of 64-bit unsigned integer
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 17, 2020 at 9:04 | history | edited | CommunityBot |
Commonmark migration
|
|
Jul 27, 2014 at 8:21 | comment | added | Todd Lehman | Daaaayammm, guys!! That is amazing work. That's not just creative; that's sick genius right there. | |
Jul 27, 2014 at 7:21 | history | edited | edc65 | CC BY-SA 3.0 |
added 141 characters in body
|
Jul 27, 2014 at 1:34 | comment | added | A Frayed Knot |
make it a ternary-recursive? return n?l(n/2)+1:-1;
|
|
Jul 26, 2014 at 23:35 | comment | added | Todd Lehman |
Nice. I can see how to shorten that by 1 character with either of {int r=-1;for(;n;n/=2)r++;return r;} or {int r=0;for(;n;n/=2)r++;return--r;} , but I can't see how to go any shorter than that.
|
|
Jul 26, 2014 at 19:58 | history | answered | edc65 | CC BY-SA 3.0 |