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

ans = 0

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

  point = i

  cnt = 0

  while point <= k-1:

    point = point*2

    cnt += 1

  ans += (1/n) * (1/2)**cnt

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

ans = 0

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

  point = i

  cnt = 0

  while point <= k-1:

    point = point*2

    cnt += 1

  ans += (1/2)**cnt

print((ans/n))
n, k = list(map(int, input().split()))
ans = 0
for i in range(1, n + 1):
    point = i
    cnt = 0
    while point <= k - 1:
        point = point * 2
        cnt += 1
    ans += (1 / n) * (1 / 2) ** cnt
print(ans)

n, k = list(map(int, input().split()))
ans = 0
for i in range(1, n + 1):
    point = i
    cnt = 0
    while point <= k - 1:
        point = point * 2
        cnt += 1
    ans += (1 / 2) ** cnt
print((ans / n))

-    ans += (1 / n) * (1 / 2) ** cnt -print(ans) +    ans += (1 / 2) ** cnt +print((ans / n))