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

ans = 0

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

    c = 0

    while(i < K):

        i *= 2

        c += 1

    ans +=  1 / 2 ** c

print((1/N * ans))
n, k = list(map(int, input().split()))



ans = 0

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

    cnt = 0

    while i < k:

        i *= 2

        cnt += 1

    ans += (1/2) ** cnt 

ans /= n

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

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

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