calculate logarithm base 2 of number very close to 1

Apr 2011
2
0
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?
 

chisigma

MHF Hall of Honor
Mar 2009
2,162
994
near Piacenza (Italy)
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?
Remembering the 'logarithmics series'...

(1)

... setting
if
is...

(2)

Kind regards

\(\displaystyle \chi\) \(\displaystyle \sigma\)