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



ans = 0

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

  t = 0

  while i < k:

    i = i*2

    t += 1

  ans += (0.5**t)/n

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



ans = 0

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

  t = 0

  while i < k:

    i *= 2

    t += 1

  ans += 0.5**t

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

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

-        i = i * 2 +        i *= 2 -    ans += (0.5**t) / n -print(ans) +    ans += 0.5**t +print((ans / n))