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



j = 0



while k > 2 ** j:

    j += 1



jl = [j]



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

    p = jl[i - 2]

    if k <= i:

        p = 0

    else:

        while True:

            p -= 1

            if k > i * (2**p):

                p += 1

                break

    jl.append(p)



ans = 0



for j in jl:

    ans += 2**(-j) / n



# print(jl)

print(ans)

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



ans = 0



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

    j = 0

    while True:

        if i * 2**j >= k:

            break

        j += 1

    ans += 2**(-j)/n



print(ans)

n, k = list(map(int, input().split()))
j = 0
while k > 2**j:
    j += 1
jl = [j]
for i in range(2, n + 1):
    p = jl[i - 2]
    if k <= i:
        p = 0
    else:
        while True:
            p -= 1
            if k > i * (2**p):
                p += 1
                break
    jl.append(p)
ans = 0
for j in jl:
    ans += 2 ** (-j) / n
# print(jl)
print(ans)

n, k = list(map(int, input().split()))
ans = 0
for i in range(1, n + 1):
    j = 0
    while True:
        if i * 2**j >= k:
            break
        j += 1
    ans += 2 ** (-j) / n
print(ans)

-j = 0 -while k > 2**j: -    j += 1 -jl = [j] -for i in range(2, n + 1): -    p = jl[i - 2] -    if k <= i: -        p = 0 -    else: -        while True: -            p -= 1 -            if k > i * (2**p): -                p += 1 -                break -    jl.append(p) -for j in jl: +for i in range(1, n + 1): +    j = 0 +    while True: +        if i * 2**j >= k: +            break +        j += 1 -# print(jl)