Skip to main content
14 events
when toggle format what by license comment
Feb 3, 2013 at 20:19 vote accept stevenvh
Oct 18, 2012 at 9:53 comment added J. M.'s missing motivation Yes, that too. :)
Oct 18, 2012 at 9:51 comment added Mr.Wizard @J.M. ah... or BitLength[n] != BitLength[n-1]?
Oct 18, 2012 at 9:49 comment added J. M.'s missing motivation I was thinking of a test along the lines of n == 2^(BitLength[n] - 1)
Oct 18, 2012 at 9:47 comment added Mr.Wizard @J.M. please pardon my lack of understanding, but how do you figure that? Isn't it rather like Floor@Log2@x?
Oct 18, 2012 at 9:41 comment added J. M.'s missing motivation "what are you thinking?" - well, BitLength[] is effectively equivalent to Log2[], so...
Oct 18, 2012 at 8:54 comment added Mr.Wizard @stevenvh I don't think your question has been answered but I'm not sure it can be by anyone other than the Mathematica developers. Nevertheless given the vastly superior performance of BitAnd it apparently isn't anything special. :^)
Oct 18, 2012 at 8:51 comment added stevenvh Aaah, I should have dug deeper in the documentation :-(. I knew about Log10[], but didn't know there was a Log2[] as well. Thanks. (No need for Taylor here)
Oct 18, 2012 at 8:49 history edited Mr.Wizard CC BY-SA 3.0
added 461 characters in body
Oct 18, 2012 at 8:43 comment added Mr.Wizard @J.M. what are you thinking?
Oct 18, 2012 at 8:39 comment added J. M.'s missing motivation If one still wants to take the logarithm route, BitLength[] is one function to look at...
Oct 18, 2012 at 8:34 history edited Mr.Wizard CC BY-SA 3.0
added 300 characters in body
Oct 18, 2012 at 8:23 history edited Mr.Wizard CC BY-SA 3.0
added 191 characters in body
Oct 18, 2012 at 8:12 history answered Mr.Wizard CC BY-SA 3.0