def pw_calc(arr)
  stack = []
  arr.each do |str|
    if str =~ /[0-9]+/
      stack.push(str.to_f)
    else
      b, a = stack.pop, stack.pop
      case str
        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.pop
end

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