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



coin = [0] * N

for i in range(len(coin)):

    cnt = 0

    v = i + 1

    while v < K:

        cnt += 1

        v *= 2

    coin[i] = cnt

    

ans = 0

for v in coin:

    ans += 0.5 ** v

print((ans / N))



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



cnt = 0

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

    tmp = 0

    while n < K:

        n *= 2

        tmp += 1

    cnt += 1 / 2 ** tmp



print((cnt / N))

N, K = list(map(int, input().split()))
coin = [0] * N
for i in range(len(coin)):
    cnt = 0
    v = i + 1
    while v < K:
        cnt += 1
        v *= 2
    coin[i] = cnt
ans = 0
for v in coin:
    ans += 0.5**v
print((ans / N))

N, K = list(map(int, input().split()))
cnt = 0
for n in range(1, N + 1):
    tmp = 0
    while n < K:
        n *= 2
        tmp += 1
    cnt += 1 / 2**tmp
print((cnt / N))

-coin = [0] * N -for i in range(len(coin)): -    cnt = 0 -    v = i + 1 -    while v < K: -        cnt += 1 -        v *= 2 -    coin[i] = cnt -ans = 0 -for v in coin: -    ans += 0.5**v -print((ans / N)) +cnt = 0 +for n in range(1, N + 1): +    tmp = 0 +    while n < K: +        n *= 2 +        tmp += 1 +    cnt += 1 / 2**tmp +print((cnt / N))