equire 'bigdecimal'

### main

loop do
  n, k, m, r = gets.strip.split(' ').map{|s| s.to_i}
  break if (n | k | m | r) == 0
  #p [n, k, m, r]

  rr = r + 10

  ret = BigDecimal.new(1, rr) / BigDecimal.new(n, rr)

  if m > 0
    sum = BigDecimal.new(1, rr)
    for i in (1...n)
      sum += BigDecimal.new(1, rr) / BigDecimal.new(i, rr)
    end
    ret *= sum
  end

  sstr = ret.to_s("F").ljust(r + 2, '0')[0..(r + 1)]
  puts sstr
end