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

L = [''] * n

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

    j = 0

    while i * (2 ** j) < k:

        j += 1

    L[i - 1] = j

S = 0

for k in L:

    S += 1 / (2 ** k)

print((S / n))
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 += (0.5) ** cnt

print((ans / n))

n, k = list(map(int, input().split()))
L = [""] * n
for i in range(1, n + 1):
    j = 0
    while i * (2**j) < k:
        j += 1
    L[i - 1] = j
S = 0
for k in L:
    S += 1 / (2**k)
print((S / n))

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 += (0.5) ** cnt
print((ans / n))

-L = [""] * n +ans = 0 -    j = 0 -    while i * (2**j) < k: -        j += 1 -    L[i - 1] = j -S = 0 -for k in L: -    S += 1 / (2**k) -print((S / n)) +    cnt = 0 +    while i < k: +        i *= 2 +        cnt += 1 +    ans += (0.5) ** cnt +print((ans / n))