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

a = 0



for i in range(n):

  s=i+1

  c=0

  while s<=k-1:

    c+=1

    s*=2

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



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

a = 0



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

  c = 0

  while n<K:

    c+=1

    n*=2

  a+=(1/2**c)/N



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

N, K = list(map(int, input().split()))
a = 0
for n in range(1, N + 1):
    c = 0
    while n < K:
        c += 1
        n *= 2
    a += (1 / 2**c) / N
print(a)

-n, k = list(map(int, input().split())) +N, K = list(map(int, input().split())) -for i in range(n): -    s = i + 1 +for n in range(1, N + 1): -    while s <= k - 1: +    while n < K: -        s *= 2 -    a += 1 / n * (1 / 2**c) +        n *= 2 +    a += (1 / 2**c) / N