import sys



n=eval(input())

num = n.split()

a=int(num[0])

b=int(num[1])



def checkMultiNum(base, dst):

	num=0

	while True:

		if base >= dst:

			break;

		num+=1

		base = base * 2

		if base >= dst:

			break;

	return num



prob=1/a

res=0

for v in range(a):

	num = checkMultiNum(v+1, b)

	tmp = prob * 0.5**num

	res += tmp



print(res)
import sys



n=eval(input())

num = n.split()

a=int(num[0])

b=int(num[1])



def checkMultiNum(base, dst):

	num=0

	while True:

		if base >= dst:

			break;

		num+=1

		base = base * 2

		if base >= dst:

			break;

	return num



prob=1/a

res=0

if a >= b:

	res=prob*(a-(b-1))

for v in range(a):

	if v+1 >= b:

		break;

	num = checkMultiNum(v+1, b)

	tmp = prob * 0.5**num

	res += tmp



print(res)
import sys

n = eval(input())
num = n.split()
a = int(num[0])
b = int(num[1])


def checkMultiNum(base, dst):
    num = 0
    while True:
        if base >= dst:
            break
        num += 1
        base = base * 2
        if base >= dst:
            break
    return num


prob = 1 / a
res = 0
for v in range(a):
    num = checkMultiNum(v + 1, b)
    tmp = prob * 0.5**num
    res += tmp
print(res)

import sys

n = eval(input())
num = n.split()
a = int(num[0])
b = int(num[1])


def checkMultiNum(base, dst):
    num = 0
    while True:
        if base >= dst:
            break
        num += 1
        base = base * 2
        if base >= dst:
            break
    return num


prob = 1 / a
res = 0
if a >= b:
    res = prob * (a - (b - 1))
for v in range(a):
    if v + 1 >= b:
        break
    num = checkMultiNum(v + 1, b)
    tmp = prob * 0.5**num
    res += tmp
print(res)

+if a >= b: +    res = prob * (a - (b - 1)) +    if v + 1 >= b: +        break