# coding: utf-8

# Your code here!

n,k=list(map(float,input().split(" ")))

ans1=0

ans=0

n=int(n)

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

    c=0

    ans1=0

    while(i<k):

        i*=2

        c+=1

    ans1+=2**c

    ans+=1/ans1

   # print(c)

print((ans*(1/n)))
# coding: utf-8

# Your code here!

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

ans1=0

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

    c=0

    while(i<k):

        i*=2

        c+=1

    ans1+=0.5**c

   # print(c)

print((ans1*(1/n)))

# coding: utf-8
# Your code here!
n, k = list(map(float, input().split(" ")))
ans1 = 0
ans = 0
n = int(n)
for i in range(1, n + 1):
    c = 0
    ans1 = 0
    while i < k:
        i *= 2
        c += 1
    ans1 += 2**c
    ans += 1 / ans1
# print(c)
print((ans * (1 / n)))

# coding: utf-8
# Your code here!
n, k = list(map(int, input().split(" ")))
ans1 = 0
for i in range(1, n + 1):
    c = 0
    while i < k:
        i *= 2
        c += 1
    ans1 += 0.5**c
# print(c)
print((ans1 * (1 / n)))

-n, k = list(map(float, input().split(" "))) +n, k = list(map(int, input().split(" "))) -ans = 0 -n = int(n) -    ans1 = 0 -    ans1 += 2**c -    ans += 1 / ans1 +    ans1 += 0.5**c -print((ans * (1 / n))) +print((ans1 * (1 / n)))