# Thread: calculate logarithm base 2 of number very close to 1

1. ## calculate logarithm base 2 of number very close to 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?

2. 0.999... - Wikipedia, the free encyclopedia...
$\displaystyle log_2$ 0,(9) = 0

3. Originally Posted by thehealer
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$

4. thank you