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

ans = 0

flag = False

prob = 1



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

  flag = False

  if i >= k:

    ans += 1/n

  else:

    while flag == False:

      prob *= 1/2

      i *= 2

      if i >= k:

        ans += prob/n

        flag = True

        prob = 1

print(ans)

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

ans = 0

cnt = 0

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

  if i >= k:

    ans += 1/n

  else:

    cnt = 0

    while i < k:

      i *= 2

      cnt += 1

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

print(ans)
n, k = list(map(int, input().split()))
ans = 0
flag = False
prob = 1
for i in range(1, n + 1):
    flag = False
    if i >= k:
        ans += 1 / n
    else:
        while flag == False:
            prob *= 1 / 2
            i *= 2
            if i >= k:
                ans += prob / n
                flag = True
                prob = 1
print(ans)

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

-flag = False -prob = 1 +cnt = 0 -    flag = False -        while flag == False: -            prob *= 1 / 2 +        cnt = 0 +        while i < k: -            if i >= k: -                ans += prob / n -                flag = True -                prob = 1 +            cnt += 1 +        ans += 1 / n * (1 / 2) ** cnt