# calculate logarithm base 2 of number very close to 1

#### 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?

#### chisigma

MHF Hall of Honor
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$$

thank you