Timeline for Find the number of leading zeroes in a 64-bit integer
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 14, 2018 at 2:29 | comment | added | Kelly Lowder | I totally forgot about BitLength! | |
Dec 14, 2018 at 2:29 | history | edited | Kelly Lowder | CC BY-SA 4.0 |
referenced LegionMammal's solution
|
Dec 12, 2018 at 2:13 | comment | added | LegionMammal978 |
Boole[#>=0](64-BitLength@#)& is a good bit shorter at 28 bytes. It uses the same basic concept as yours, but applies BitLength and Boole .
|
|
Dec 10, 2018 at 23:25 | history | answered | Kelly Lowder | CC BY-SA 4.0 |