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

ans = 0

def two(x,y):

    for i in range(0,10**9):

        if x >= y:

            return i

        x *= 2

        

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

    tmp = 1/n

    pro = two(i,k)

    if pro:

        tmp *= (1/2)**pro

    else:

        pass

    ans += tmp

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

ans = 0

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

    tmp = 1/n

    a = 0

    while(i<k):

        i *= 2

        a += 1

    ans += (1/n) * ((1/2)**a)

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


def two(x, y):
    for i in range(0, 10**9):
        if x >= y:
            return i
        x *= 2


for i in range(1, n + 1):
    tmp = 1 / n
    pro = two(i, k)
    if pro:
        tmp *= (1 / 2) ** pro
    else:
        pass
    ans += tmp
print(ans)

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

- - -def two(x, y): -    for i in range(0, 10**9): -        if x >= y: -            return i -        x *= 2 - - -    pro = two(i, k) -    if pro: -        tmp *= (1 / 2) ** pro -    else: -        pass -    ans += tmp +    a = 0 +    while i < k: +        i *= 2 +        a += 1 +    ans += (1 / n) * ((1 / 2) ** a)