Talk:Binary logarithm

message: Where did the algorithm given here come from?  I would love to find an original reference for this.  Kleg 22:45, 19 July 2006 (UTC)
thread_title: [Untitled]

message: Where does the name lg come from? --Abdull (talk) 20:15, 24 July 2008 (UTC)
replies: text: I also wonder. In all my books lb x is used.--MathFacts (talk) 20:26, 16 August 2009 (UTC)
replies: text:  lg = log10. the correct symbol for binary logarithm is lb = log2  — Preceding unsigned comment added by 140.180.255.232 (talk) 19:47, 24 August 2016 (UTC)
replies: text: For values of correct meaning "recommended by a standards organization" rather than what people actually use, maybe. —David Eppstein (talk) 21:06, 24 August 2016 (UTC)
thread_title:  lg? 

message: Isn't there an error in the identity given for integers?
It says:
: \lfloor \log_2(n) \rfloor = \lceil \log_2(n >> 1) \rceil + 1, \mbox{where }n \ge 1.
But surely it should be:
: \lfloor \log_2(n) \rfloor = \lceil \log_2((n >> 1) + 1) \rceil, \mbox{where }n \ge 1.
?  —Preceding unsigned comment added by 195.27.20.35 (talk) 12:05, 26 February 2010 (UTC)
thread_title:  Error in identity? 

message: Python example is clearly too complex and too long. 1exec1 (talk) 17:53, 24 April 2010 (UTC)
thread_title:  python example 

message: wouldn't it be nicer code to use
 while(n>>=1!=0)
   ++pos;
instead of
 if (n >= 1<<16) { n >>= 16; pos += 16; }
 if (n >= 1<< 8) { n >>=  8; pos +=  8; }
 if (n >= 1<< 4) { n >>=  4; pos +=  4; }
 if (n >= 1<< 2) { n >>=  2; pos +=  2; }
 if (n >= 1<< 1) {           pos +=  1; }
? -- 129.247.247.239 (talk) 11:53, 16 July 2010 (UTC)
replies: text: Yes, I agree.  The point of an article like this is to explain how a binary logarithm works, not to show some super-optimized and confusing C version.  On the other hand, no one really writes anything in C anymore, unless it needs to run really fast... Moxfyre (ǝɹʎℲxoɯ | contrib) 15:28, 16 July 2010 (UTC)
thread_title:  C example 

message: I don't know enough about Wikipedia to find out who wrote the "Iterative approximation" section, but to whoever did, thank you. Algorithms for calculating a logarithm are surprisingly hard to find, and that section was far and away the clearest and most helpful description I've found. I'm sure that I'm using the talk page wrong, so feel free to delete this section, but I just had to express my gratitude. Cormac596 (talk) 14:47, 1 June 2022 (UTC)
replies: text: It appears to have been added as Python code by a not-logged-in editor in March 2006, and converted to roughly the current form by User:Moxfyre in September 2008. —David Eppstein (talk) 16:25, 1 June 2022 (UTC)
replies: text: @Cormac596 Yep, that's right. I thought it was pretty cool, and I was learning/polishing my Python skills so I did a bit of cleanup 🤓. —Moxfyre (ǝɹʎℲxoɯ | contrib) 16:34, 1 June 2022 (UTC)
replies: text: In that case, thank you Moxfyre. :) Cormac596 (talk) 20:49, 1 June 2022 (UTC)
thread_title:  A special thanks 

message: The following Wikimedia Commons file used on this page or its Wikidata item has been nominated for deletion:
* 
Participate in the deletion discussion at the . —Community Tech bot (talk) 11:52, 23 August 2022 (UTC)
thread_title:  A Commons file used on this page or its Wikidata item has been nominated for deletion