class Float
  def minus(other)
    return other - self
  end
  def divide(other)
    return other / self
  end
end
def main(input =STDIN)
  operater = {"+" => :+, "-" => :minus, "*" => :*, "/" => :divide}
  while arg = input.gets
    express = arg.chomp.split(" ")
    stack = []
    while (char = express.shift)
      if operater.key?(char)
        stack.push(stack.pop.send(operater[char], stack.pop))
      else
        stack.push(char.to_f)
      end
    end
    puts stack
  end
end
main