20110418, 07:39  #1 
2×103 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
2×3×19×31 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
17×251 Posts 
Wolfram Alpha seems to have no trouble with it.

20110418, 17:21  #5  
Nov 2003
2^{2}·5·373 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^{2}×2,333 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
2×29×103 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
2^{6}·131 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 