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



ans=0

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

    c=0

    j=i

    while j<m:

        j=j*2

        c+=1

    ans+=(1/n)*(1/2)**c

print(ans)

    

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



s=0

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

      c=0

      while k>i:

            i=i*2

            c+=1

      s+=(1/n)*((1/2)**c)

print(s)

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

n, k = list(map(int, input().split()))
s = 0
for i in range(1, n + 1):
    c = 0
    while k > i:
        i = i * 2
        c += 1
    s += (1 / n) * ((1 / 2) ** c)
print(s)

-n, m = list(map(int, input().split())) -ans = 0 +n, k = list(map(int, input().split())) +s = 0 -    j = i -    while j < m: -        j = j * 2 +    while k > i: +        i = i * 2 -    ans += (1 / n) * (1 / 2) ** c -print(ans) +    s += (1 / n) * ((1 / 2) ** c) +print(s)