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

for i in range(n):

  i+=1;p=1/n

  while i<k:i*=2;p/=2

  a+=p

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

p=0

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

  if i<k: p+=4*0.5**len(bin(~-k//i))

  else: p+=1

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

n, k = list(map(int, input().split()))
p = 0
for i in range(1, n + 1):
    if i < k:
        p += 4 * 0.5 ** len(bin(~-k // i))
    else:
        p += 1
print((p / n))

-a = 0 -for i in range(n): -    i += 1 -    p = 1 / n -    while i < k: -        i *= 2 -        p /= 2 -    a += p -print(a) +p = 0 +for i in range(1, n + 1): +    if i < k: +        p += 4 * 0.5 ** len(bin(~-k // i)) +    else: +        p += 1 +print((p / n))