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



ans = 0

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

  c = 0

  while i<k:

    i = i * 2

    c += 1

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

  

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



import math

ans = 0

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

  if i < k:

    t = math.log10(k/i)/math.log10(2)

    if t == int(t):

      ans += 1/(2**t)

    else:

      ans += 1/(2**(int(t+1)))

  else:

    ans += 1

  

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

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

ans = 0
for i in range(1, n + 1):
    if i < k:
        t = math.log10(k / i) / math.log10(2)
        if t == int(t):
            ans += 1 / (2**t)
        else:
            ans += 1 / (2 ** (int(t + 1)))
    else:
        ans += 1
print((ans / n))

+import math + -    c = 0 -    while i < k: -        i = i * 2 -        c += 1 -    ans += float(1 / 2) ** c +    if i < k: +        t = math.log10(k / i) / math.log10(2) +        if t == int(t): +            ans += 1 / (2**t) +        else: +            ans += 1 / (2 ** (int(t + 1))) +    else: +        ans += 1