def calc( rpn )
	stack = Array.new

	while rpn.size > 0
		c = rpn.shift
		if c == '+'
			n1 = stack.pop
			n2 = stack.pop
			stack.push( n2 + n1 )
		elsif c == '-'
			n1 = stack.pop
			n2 = stack.pop
			stack.push( n2 - n1 )
		elsif c == '*'
			n1 = stack.pop
			n2 = stack.pop
			stack.push( n2 * n1 )
		elsif c == '/'
			n1 = stack.pop
			n2 = stack.pop
			stack.push( n2 / n1 )
		else
			stack.push( c.to_f )
		end
	end
	return stack.pop
end

def main
	answers = Array.new
	while line = $stdin.gets
		rpn = line.chomp.split( /\s/ )
		answers << calc( rpn )
	end
	answers.each{ |a| printf( "%.6f\n", a)}
end
main
