import math

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

list2 = [1]

tmp = 1

while tmp < 10 ** 5 + 1:

    tmp *= 2

    list2 += [tmp]



L2 = len(list2)

ans = 0

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

    tmp = math.ceil(K/i)

    

    for j in range(L2):

        if tmp <= list2[j]:

            break

    ans += list2[j] ** (-1)

ans /= N

print(ans)


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

ans = 0



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

    

    c = 1

    p = 1/N

    while c*i<K:

        c *= 2

        p /= 2

    ans += p

print(ans)
import math

N, K = list(map(int, input().split()))
list2 = [1]
tmp = 1
while tmp < 10**5 + 1:
    tmp *= 2
    list2 += [tmp]
L2 = len(list2)
ans = 0
for i in range(1, N + 1):
    tmp = math.ceil(K / i)
    for j in range(L2):
        if tmp <= list2[j]:
            break
    ans += list2[j] ** (-1)
ans /= N
print(ans)

N, K = list(map(int, input().split()))
ans = 0
for i in range(1, N + 1):
    c = 1
    p = 1 / N
    while c * i < K:
        c *= 2
        p /= 2
    ans += p
print(ans)

-import math - -list2 = [1] -tmp = 1 -while tmp < 10**5 + 1: -    tmp *= 2 -    list2 += [tmp] -L2 = len(list2) -    tmp = math.ceil(K / i) -    for j in range(L2): -        if tmp <= list2[j]: -            break -    ans += list2[j] ** (-1) -ans /= N +    c = 1 +    p = 1 / N +    while c * i < K: +        c *= 2 +        p /= 2 +    ans += p