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

a=0

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

  j=0

  while i<k:i*=2;j+=1

  a+=1/n*.5**j

print(a)
n,k=list(map(int,input().split()));a=0

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

 j=1/n

 while i<k:i*=2;j*=.5

 a+=j

print(a)
n, k = list(map(int, input().split()))
a = 0
for i in range(1, n + 1):
    j = 0
    while i < k:
        i *= 2
        j += 1
    a += 1 / n * 0.5**j
print(a)

n, k = list(map(int, input().split()))
a = 0
for i in range(1, n + 1):
    j = 1 / n
    while i < k:
        i *= 2
        j *= 0.5
    a += j
print(a)

-    j = 0 +    j = 1 / n -        j += 1 -    a += 1 / n * 0.5**j +        j *= 0.5 +    a += j