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

ans = 0 

for i in range(n):

  score = i+1

  count = 0

  while score <= k-1:

    count += 1

    temp = score

    score = temp*2

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

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

a=0 

for i in range(n):

  s=i+1;c=0

  while s<=k-1:

    c+=1;s*=2

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

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

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

-ans = 0 +a = 0 -    score = i + 1 -    count = 0 -    while score <= k - 1: -        count += 1 -        temp = score -        score = temp * 2 -    ans += 1 / n * ((1 / 2) ** count) -print(ans) +    s = i + 1 +    c = 0 +    while s <= k - 1: +        c += 1 +        s *= 2 +    a += 1 / n * (1 / 2**c) +print(a)