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

ans=0

a=0

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

    count=0

    while i<k:

        i*=2

        count+=1

    ans+=(0.5)**count/n

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

ans=0

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

    count=0

    now=i

    if i<k:

        while now<k:

            now*=2

            count+=1

        ans+=0.5**count

    else:

        ans+=1







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

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

-a = 0 -    while i < k: -        i *= 2 -        count += 1 -    ans += (0.5) ** count / n -print(ans) +    now = i +    if i < k: +        while now < k: +            now *= 2 +            count += 1 +        ans += 0.5**count +    else: +        ans += 1 +print((ans / n))