20110418, 07:39  #1 
5×1,129 Posts 
calculate logarithm base 2 of number very close 1
I need to calculate logarithm base 2 of number very close to 1. for example
log2(0.9999999999999999999999999999999… The expected result is around 2^80. I can't calculate it even with Matlab. Anyone can help me? 
20110418, 10:40  #3 
Tribal Bullet
Oct 2004
110111010111_{2} Posts 
Look up the infinite series for ln(1+x) centered about x=0. For your value of x you should get twice the double precision accuracy with a single term. Then divide by ln2 to convert to the base2 logarithm.

20110418, 11:20  #4 
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
1000010101100_{2} Posts 
Wolfram Alpha seems to have no trouble with it.

20110418, 17:21  #5  
Nov 2003
1D24_{16} Posts 
Quote:
merely pointing at black boxes to perform the requested calculation. 

20110418, 22:35  #6 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
2·7·683 Posts 
http://cr.yp.to/2005590/goldberg.pdf ...and see Theorem 4.
Come for the log_{2}(1x), stay for the whole document. It will be worth it. 
20110419, 05:27  #7 
Aug 2006
3·1,993 Posts 

20110420, 06:27  #8  
"Richard B. Woods"
Aug 2002
Wisconsin USA
2^{2}×3×641 Posts 
Quote:


20110420, 12:53  #9  
Nov 2003
2^{2}·5·373 Posts 
Quote:


20110420, 14:02  #10 
"Forget I exist"
Jul 2009
Dumbassville
20C0_{16} Posts 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Finding multiples of a real number that are close to a whole number  mickfrancis  Math  16  20170301 07:17 
[Curiosity] Binary logarithm of a Mersenne number  jnml  Miscellaneous Math  3  20131130 05:35 
The base of the logarithm in AKS algorithms  Sairam  Math  34  20110612 02:24 
Fastest possible algorithm to calculate the square root of a 10,000,000 digit number  Fusion_power  Math  19  20071102 21:37 
Formula to calculate number of potential factors?  Fusion_power  Miscellaneous Math  13  20051024 17:58 