def norm_of(n, k)
    ret = 0
    while n * (2 ** ret) < k
        ret += 1
    end
    ret
end

n, k = gets.split.map(&:to_i)

norms = [nil] * (n + 1)
norms[1] = norm_of(1, k)

(2..n).each{|num|
    if norms[num] == nil
        val = norm_of(num, k)
        (num..n).step(num).each_with_index{|mult_num, index|
            norms[mult_num] = val - index
        }
    end
}

puts norms[1..-1].map{|it| it < 1 ? 1.0 : 1.0 / (2 ** it)}.inject(:+) / n
