def winrate(wn, wk):

    b = 0

    while wn * 2**b < wk:

        b += 1

    return 1/2 ** b



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

ans = 0

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

    ans += 1/n * winrate(i, k)

print(ans)

def winrate(wn, wk):

    b = 0

    c = wn

    while c < wk:

        b += 1

        c *= 2

    return 1/2 ** b



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

ans = 0

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

    ans += 1/n * winrate(i, k)

print(ans)

def winrate(wn, wk):
    b = 0
    while wn * 2**b < wk:
        b += 1
    return 1 / 2**b


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

def winrate(wn, wk):
    b = 0
    c = wn
    while c < wk:
        b += 1
        c *= 2
    return 1 / 2**b


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

-    while wn * 2**b < wk: +    c = wn +    while c < wk: +        c *= 2