import math

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



ans = 0

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

  x = max(math.ceil(math.log2(k)-math.log2(i)), 0)

  # print(x)

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

print(ans)

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



import math

ans = 0

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

    if i >= k:

        t = 0

    else:

        t = math.ceil(math.log2(k/i))

    #print(t)

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

print(ans)

import math

n, k = list(map(int, input().split()))
ans = 0
for i in range(1, n + 1):
    x = max(math.ceil(math.log2(k) - math.log2(i)), 0)
    # print(x)
    ans += (1 / n) * ((1 / 2) ** x)
print(ans)

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

ans = 0
for i in range(1, n + 1):
    if i >= k:
        t = 0
    else:
        t = math.ceil(math.log2(k / i))
    # print(t)
    ans += (1 / n) * ((1 / 2) ** t)
print(ans)

+n, k = list(map(int, input().split())) -n, k = list(map(int, input().split())) -    x = max(math.ceil(math.log2(k) - math.log2(i)), 0) -    # print(x) -    ans += (1 / n) * ((1 / 2) ** x) +    if i >= k: +        t = 0 +    else: +        t = math.ceil(math.log2(k / i)) +    # print(t) +    ans += (1 / n) * ((1 / 2) ** t)