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

ans = 0

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

    tmp = i

    cnt = 0

    while tmp < k:

        tmp *= 2

        cnt += 1

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

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



ans = 0

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

    tmp = i

    cnt = 0

    while tmp < K:

        tmp *= 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):
    tmp = i
    cnt = 0
    while tmp < k:
        tmp *= 2
        cnt += 1
    ans += (1 / n) * pow((1 / 2), cnt)
print(ans)

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

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