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



ans = 0



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

    pr = 1/N

    

    score = i

    

    while score <= K-1 :

        pr *= (1/2)

        score *= 2

    ans += pr

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



ans = 0



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

    pr = (1/N)

    score = i

    

    while score <= K-1 :

        score *= 2

        pr *= 0.5

    

    ans += pr



print(ans)

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

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

-        pr *= 1 / 2 +        pr *= 0.5