import math

e=0

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

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

  m = math.ceil(math.log2(k/i))

  e += 1*(m<1) or 2**-m

print((e/n))
from math import *

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

e=0

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

  t=ceil(log2(k/i))

  e+=1*(t<1)or 2**-t

print((e/n))
import math

e = 0
n, k = list(map(int, input().split()))
for i in range(1, n + 1):
    m = math.ceil(math.log2(k / i))
    e += 1 * (m < 1) or 2**-m
print((e / n))

from math import *

n, k = list(map(int, input().split()))
e = 0
for i in range(1, n + 1):
    t = ceil(log2(k / i))
    e += 1 * (t < 1) or 2**-t
print((e / n))

-import math +from math import * +n, k = list(map(int, input().split())) -n, k = list(map(int, input().split())) -    m = math.ceil(math.log2(k / i)) -    e += 1 * (m < 1) or 2**-m +    t = ceil(log2(k / i)) +    e += 1 * (t < 1) or 2**-t