import sys

input = sys.stdin.readline

 

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

prob = 0

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

  count = 0

  total = i

  while total < k:

    total *= 2

    count += 1

  prob += 1/2**count

print((prob/n))

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



ans = 0

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

  cnt = 0

  point = i

  while point < K:

    point *= 2

    cnt += 1

  ans += 1/N * (0.5**cnt)

  

print(ans)  
import sys

input = sys.stdin.readline
n, k = list(map(int, input().split()))
prob = 0
for i in range(1, n + 1):
    count = 0
    total = i
    while total < k:
        total *= 2
        count += 1
    prob += 1 / 2**count
print((prob / n))

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

-import sys - -input = sys.stdin.readline -n, k = list(map(int, input().split())) -prob = 0 -for i in range(1, n + 1): -    count = 0 -    total = i -    while total < k: -        total *= 2 -        count += 1 -    prob += 1 / 2**count -print((prob / n)) +N, K = list(map(int, input().split())) +ans = 0 +for i in range(1, N + 1): +    cnt = 0 +    point = i +    while point < K: +        point *= 2 +        cnt += 1 +    ans += 1 / N * (0.5**cnt) +print(ans)