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

li = []



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

    a=0

    while i*(2**a)<k:

        a+=1

    li.append((1/n)*(1/2**a))

    

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



sum1 = 0

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

    p = 0

    while True:

        if (2**p)*i >= k:

            break

        p +=1

    sum1 += 1/(n*2**p)

print(sum1)
n, k = list(map(int, input().split()))
li = []
for i in range(1, n + 1):
    a = 0
    while i * (2**a) < k:
        a += 1
    li.append((1 / n) * (1 / 2**a))
print((sum(li)))

n, k = list(map(int, input().split()))
sum1 = 0
for i in range(1, n + 1):
    p = 0
    while True:
        if (2**p) * i >= k:
            break
        p += 1
    sum1 += 1 / (n * 2**p)
print(sum1)

-li = [] +sum1 = 0 -    a = 0 -    while i * (2**a) < k: -        a += 1 -    li.append((1 / n) * (1 / 2**a)) -print((sum(li))) +    p = 0 +    while True: +        if (2**p) * i >= k: +            break +        p += 1 +    sum1 += 1 / (n * 2**p) +print(sum1)