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

result = 0

seq = []



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

    count = 0

    temp = i

    while temp < k:

        temp *= 2

        count += 1

    seq.append(count)



for i in range(n):

    result += 1/n * (0.5)**seq[i]

    

    

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

ans = 0.0



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

    count = 0    

    while i < k:

        i *= 2

        count +=1

    ans += 1/n * (0.5** count)



print(ans)
n, k = list(map(int, input().split()))
result = 0
seq = []
for i in range(1, n + 1):
    count = 0
    temp = i
    while temp < k:
        temp *= 2
        count += 1
    seq.append(count)
for i in range(n):
    result += 1 / n * (0.5) ** seq[i]
print(result)

n, k = list(map(int, input().split()))
ans = 0.0
for i in range(1, n + 1):
    count = 0
    while i < k:
        i *= 2
        count += 1
    ans += 1 / n * (0.5**count)
print(ans)

-result = 0 -seq = [] +ans = 0.0 -    temp = i -    while temp < k: -        temp *= 2 +    while i < k: +        i *= 2 -    seq.append(count) -for i in range(n): -    result += 1 / n * (0.5) ** seq[i] -print(result) +    ans += 1 / n * (0.5**count) +print(ans)