from math import *

n,k=list(map(int,input().split()))

e=0

for i in range(1,n+1):

  t=ceil(log2(k/i))

  e+=1*(t<1)or 2**-t

print((e/n))
n, k = list(map(int, input().split()))

e=0

for i in range(1, n+1):

  tmp = i

  t = 0

  while tmp < k:

    tmp *= 2

    t += 1

  e += 1*(t==0) or 2**-t

print((e/n))
from math import *

n, k = list(map(int, input().split()))
e = 0
for i in range(1, n + 1):
    t = ceil(log2(k / i))
    e += 1 * (t < 1) or 2**-t
print((e / n))

n, k = list(map(int, input().split()))
e = 0
for i in range(1, n + 1):
    tmp = i
    t = 0
    while tmp < k:
        tmp *= 2
        t += 1
    e += 1 * (t == 0) or 2**-t
print((e / n))

-from math import * - -    t = ceil(log2(k / i)) -    e += 1 * (t < 1) or 2**-t +    tmp = i +    t = 0 +    while tmp < k: +        tmp *= 2 +        t += 1 +    e += 1 * (t == 0) or 2**-t