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)

(1..n).each{|index|
    if norms[index] == nil
        val = norm_of(index, k)
        count = 0
        while index * (2 ** count) <= n
            norms[index * (2 ** count)] = val - count
            count += 1
        end
    end
}

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