import math



N, K = list(map(int,input().split()))

#N, K = 100000, 5



ans = 0

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

	a = i

	b = 1

	while a < K:

		a *= 2

		b *= 0.50000000000

	ans += b





print((ans/N))

import math



N, K = list(map(int,input().split()))

#N, K = 100000, 5



ans = 0

total = 0

for i in range(0,N):

	if i < K:

	#dice_times = math.ceil(math.log2(K/(i+1)))

		dice_times = math.ceil(math.log2(K/(i+1)))

		total = total + (0.50000000000**dice_times)

		#print(total)

	else:

		total += 1



print((total/N))

import math

N, K = list(map(int, input().split()))
# N, K = 100000, 5
ans = 0
for i in range(1, N + 1):
    a = i
    b = 1
    while a < K:
        a *= 2
        b *= 0.50000000000
    ans += b
print((ans / N))

import math

N, K = list(map(int, input().split()))
# N, K = 100000, 5
ans = 0
total = 0
for i in range(0, N):
    if i < K:
        # dice_times = math.ceil(math.log2(K/(i+1)))
        dice_times = math.ceil(math.log2(K / (i + 1)))
        total = total + (0.50000000000**dice_times)
        # print(total)
    else:
        total += 1
print((total / N))

-for i in range(1, N + 1): -    a = i -    b = 1 -    while a < K: -        a *= 2 -        b *= 0.50000000000 -    ans += b -print((ans / N)) +total = 0 +for i in range(0, N): +    if i < K: +        # dice_times = math.ceil(math.log2(K/(i+1))) +        dice_times = math.ceil(math.log2(K / (i + 1))) +        total = total + (0.50000000000**dice_times) +        # print(total) +    else: +        total += 1 +print((total / N))