Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: log to the base 2


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: log to the base 2
Date   Tue, 17 Oct 2006 18:03:46 +0100

You hardly need any such function. The recipe 
log(x) / log(2) or log10(x) / log10(2) will suffice. 

For example, 

. di log(8) / log(2)
3

Strictly just one log function is enough, but -log10()- 
is a convenience for those preferring the unnatural.  

Nick 
[email protected] 

Raphael Fraser
 
> I have been trying to find a function that can calculate the log of a
> number to base 2. I can't find one. Am I missing something here or am
> I not searching hard enough? Can any one help?
> 
> I see log to base 10 and log to base e but what happen to the 
> other bases?

 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index