import math

N,K=[int(s) for s in input().split()]

a=0

for i in range(N):

  a+=2**(-max([0,math.ceil(math.log2(K/(i+1)))]))

print((a/N))
N,K=[int(s) for s in input().split()]

a=0

for i in range(N):

  x=i+1

  n=0

  while x<K:

    n+=1

    x*=2

  a+=2**(-n)

print((a/N))
import math

N, K = [int(s) for s in input().split()]
a = 0
for i in range(N):
    a += 2 ** (-max([0, math.ceil(math.log2(K / (i + 1)))]))
print((a / N))

N, K = [int(s) for s in input().split()]
a = 0
for i in range(N):
    x = i + 1
    n = 0
    while x < K:
        n += 1
        x *= 2
    a += 2 ** (-n)
print((a / N))

-import math - -    a += 2 ** (-max([0, math.ceil(math.log2(K / (i + 1)))])) +    x = i + 1 +    n = 0 +    while x < K: +        n += 1 +        x *= 2 +    a += 2 ** (-n)