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

l=[]

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

  score=i

  while 1<=score<=(K-1):

    score*=2

  prob=(1/N)*i/score

  l.append(prob)

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

prob=0

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

  score=i

  omote=0

  while 1<=score<=K-1:

    score=score*2

    omote+=1

  prob+=(1/N)*((1/2)**omote)

print(prob)
N, K = list(map(int, input().split()))
l = []
for i in range(1, N + 1):
    score = i
    while 1 <= score <= (K - 1):
        score *= 2
    prob = (1 / N) * i / score
    l.append(prob)
print((sum(l)))

N, K = list(map(int, input().split()))
prob = 0
for i in range(1, N + 1):
    score = i
    omote = 0
    while 1 <= score <= K - 1:
        score = score * 2
        omote += 1
    prob += (1 / N) * ((1 / 2) ** omote)
print(prob)

-l = [] +prob = 0 -    while 1 <= score <= (K - 1): -        score *= 2 -    prob = (1 / N) * i / score -    l.append(prob) -print((sum(l))) +    omote = 0 +    while 1 <= score <= K - 1: +        score = score * 2 +        omote += 1 +    prob += (1 / N) * ((1 / 2) ** omote) +print(prob)