import math

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

ans=0

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

    ans+=(1/2)**math.ceil(max(math.log2(k/i),0))

print((ans/n))

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

ans=0

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

	tmp=1/n

	cnt=i

	while cnt<k:

		cnt*=2

		tmp/=2

	ans+=tmp

print(ans)

# x
import math

n, k = list(map(int, input().split()))
ans = 0
for i in range(1, n + 1):
    ans += (1 / 2) ** math.ceil(max(math.log2(k / i), 0))
print((ans / n))

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

-import math - -    ans += (1 / 2) ** math.ceil(max(math.log2(k / i), 0)) -print((ans / n)) +    tmp = 1 / n +    cnt = i +    while cnt < k: +        cnt *= 2 +        tmp /= 2 +    ans += tmp +print(ans) +# x