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

p=0

for i in range(1,n+1): p+=[1,4/2**len(bin(~-k//i))][i<k]

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

print((sum([1,4/2**len(bin(~-k//i))][i<k] for i in range(1,n+1))/n))
n, k = list(map(int, input().split()))
p = 0
for i in range(1, n + 1):
    p += [1, 4 / 2 ** len(bin(~-k // i))][i < k]
print((p / n))

n, k = list(map(int, input().split()))
print((sum([1, 4 / 2 ** len(bin(~-k // i))][i < k] for i in range(1, n + 1)) / n))

-p = 0 -for i in range(1, n + 1): -    p += [1, 4 / 2 ** len(bin(~-k // i))][i < k] -print((p / n)) +print((sum([1, 4 / 2 ** len(bin(~-k // i))][i < k] for i in range(1, n + 1)) / n))