N, K = list(map(int, input().split()))



p = 0

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

    t = 1 / N

    while i < K:

        i *= 2

        t *= 1 / 2

    p += t

print(p)

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



ans = 0

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

    p = 1 / n

    while i < k:

        p /= 2

        i *= 2

    ans += p

print(ans)

N, K = list(map(int, input().split()))
p = 0
for i in range(1, N + 1):
    t = 1 / N
    while i < K:
        i *= 2
        t *= 1 / 2
    p += t
print(p)

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

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