# 2019/05/19

# AtCoder Beginner Contest 126 - C



import math



# Input

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



# Init

bl = list()

for i in range(18):

    bl.append(2 ** i)



# Calc

ans = 0

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



    for j in range(18):

        wval = i * bl[j]

        if wval >= k:

            break

    ans += (1 / n) * (1 / bl[j])



# Output

print(ans)

# 2020/07/23

# AtCoder Beginner Contest 126 - C

import math



# Input

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



ans = 0



# Calc

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

    idx = 1

    wval = i

    while(wval < k):

        wval = wval * 2

        idx = idx + 1

    

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



# Output

print((ans*2))

# 2019/05/19
# AtCoder Beginner Contest 126 - C
import math

# Input
n, k = list(map(int, input().split()))
# Init
bl = list()
for i in range(18):
    bl.append(2**i)
# Calc
ans = 0
for i in range(1, n + 1):
    for j in range(18):
        wval = i * bl[j]
        if wval >= k:
            break
    ans += (1 / n) * (1 / bl[j])
# Output
print(ans)

# 2020/07/23
# AtCoder Beginner Contest 126 - C
import math

# Input
n, k = list(map(int, input().split()))
ans = 0
# Calc
for i in range(1, n + 1):
    idx = 1
    wval = i
    while wval < k:
        wval = wval * 2
        idx = idx + 1
    ans = ans + (1 / n) * (1 / 2) ** idx
# Output
print((ans * 2))

-# 2019/05/19 +# 2020/07/23 -# Init -bl = list() -for i in range(18): -    bl.append(2**i) +ans = 0 -ans = 0 -    for j in range(18): -        wval = i * bl[j] -        if wval >= k: -            break -    ans += (1 / n) * (1 / bl[j]) +    idx = 1 +    wval = i +    while wval < k: +        wval = wval * 2 +        idx = idx + 1 +    ans = ans + (1 / n) * (1 / 2) ** idx -print(ans) +print((ans * 2))