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

ans=0

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

    cnt=0

    p=i



    while p<k:

        p*=2

        cnt+=1

    

    ans+=(1/2)**cnt



print((ans*(1/n)))
n, k=list(map(int, input().split()))



ans=0

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

    cnt=0

    while i<=k-1:

        i=2*i

        cnt+=1

        

    ans+=(1/2)**cnt



ans/=n



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

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

-    p = i -    while p < k: -        p *= 2 +    while i <= k - 1: +        i = 2 * i -print((ans * (1 / n))) +ans /= n +print(ans)