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

x=1/n

y=1/2

ans=0

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

    for j in range(18):

        if i*2**j>=k:

            ans+=x*y**j

            break

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

x=1/n

y=1/2

ans=0

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

    if i>=k:

        ans+=x

        continue

    for j in range(18):

        if i*2**j>=k:

            ans+=x*y**j

            break

print(ans)
n, k = list(map(int, input().split()))
x = 1 / n
y = 1 / 2
ans = 0
for i in range(1, n + 1):
    for j in range(18):
        if i * 2**j >= k:
            ans += x * y**j
            break
print(ans)

n, k = list(map(int, input().split()))
x = 1 / n
y = 1 / 2
ans = 0
for i in range(1, n + 1):
    if i >= k:
        ans += x
        continue
    for j in range(18):
        if i * 2**j >= k:
            ans += x * y**j
            break
print(ans)

+    if i >= k: +        ans += x +        continue