import math

N,K=[int(s) for s in input().split()]

sum=0

for i in range(N):

  a=max([math.log(K/(i+1), 2),0])

  a=math.ceil(a)

  sum=sum+0.5**a

print((sum/N))
import math

N,K=[int(s) for s in input().split()]

a=0

for i in range(N):

  a+=2**(-max([0,math.ceil(math.log2(K/(i+1)))]))

print((a/N))
import math

N, K = [int(s) for s in input().split()]
sum = 0
for i in range(N):
    a = max([math.log(K / (i + 1), 2), 0])
    a = math.ceil(a)
    sum = sum + 0.5**a
print((sum / N))

import math

N, K = [int(s) for s in input().split()]
a = 0
for i in range(N):
    a += 2 ** (-max([0, math.ceil(math.log2(K / (i + 1)))]))
print((a / N))

-sum = 0 +a = 0 -    a = max([math.log(K / (i + 1), 2), 0]) -    a = math.ceil(a) -    sum = sum + 0.5**a -print((sum / N)) +    a += 2 ** (-max([0, math.ceil(math.log2(K / (i + 1)))])) +print((a / N))