N, K = list(map(int,input().split()))

from math import ceil, log2

m_list = [ceil(log2(K/(n+1))) if n+1<K else 0 for n in range(N)]

#print(m_list) #各nに対し勝つのに必要な表の数



#

# m_list = []

# for n in range(N):

#     if n+1 >=



def calc_prob(x):

    return (1/2)**x



prob_list = list(map(calc_prob,m_list))



# Kより大きいインデックスのところは1に書き換え

#print(prob_list)

print((sum(prob_list)/N))
N, K = list(map(int,input().split()))

from math import ceil, log2

m_list = [(1/2)**ceil(log2(K/(n+1))) if n+1<K else 1 for n in range(N)]

#print(m_list) #各nに対し勝つのに必要な表の数

print((sum(m_list)/N))
N, K = list(map(int, input().split()))
from math import ceil, log2

m_list = [ceil(log2(K / (n + 1))) if n + 1 < K else 0 for n in range(N)]
# print(m_list) #各nに対し勝つのに必要な表の数
#
# m_list = []
# for n in range(N):
#     if n+1 >=
def calc_prob(x):
    return (1 / 2) ** x


prob_list = list(map(calc_prob, m_list))
# Kより大きいインデックスのところは1に書き換え
# print(prob_list)
print((sum(prob_list) / N))

N, K = list(map(int, input().split()))
from math import ceil, log2

m_list = [(1 / 2) ** ceil(log2(K / (n + 1))) if n + 1 < K else 1 for n in range(N)]
# print(m_list) #各nに対し勝つのに必要な表の数
print((sum(m_list) / N))

-m_list = [ceil(log2(K / (n + 1))) if n + 1 < K else 0 for n in range(N)] +m_list = [(1 / 2) ** ceil(log2(K / (n + 1))) if n + 1 < K else 1 for n in range(N)] -# -# m_list = [] -# for n in range(N): -#     if n+1 >= -def calc_prob(x): -    return (1 / 2) ** x - - -prob_list = list(map(calc_prob, m_list)) -# Kより大きいインデックスのところは1に書き換え -# print(prob_list) -print((sum(prob_list) / N)) +print((sum(m_list) / N))