def calc_pw(arr)
  stack = []
  arr.each do |st|
    if st =~ /[0-9]+/
      stack.push(st.to_f)
    else
      b, a = stack.pop, stack.pop
      case st
        when "+"
          stack.push(a+b)
        when "-"
          stack.push(a-b)
        when "*"
          stack.push(a*b)
        when "/"
          stack.push(a/b)
      end
    end
  end
  return stack.first
end

while gets do
  arr = $_.split(' ')
  num = calc_pw(arr)
  puts sprintf("%.6f", num)
end