#include<iostream>
#include<iomanip>
#include<sstream>
#include<stack>
#include<string>
#include<cstdlib>

double calc( char op, double a, double b )
{
	switch( op )
	{
		case '+':
			return a + b;
		case '-':
			return a - b;
		case '*':
			return a * b;
		case '/':
			return a / b;
	}
}

int main()
{
	std::string str;
	while( std::getline( std::cin, str ) )
	{
		std::stack<double> s;
		std::istringstream iss( str );
		std::string item;

		while( iss >> item )
		{
			if( item == "+" || item == "-" || item == "*" || item == "/" )
			{
				double b = s.top(); s.pop();
				double a = s.top(); s.pop();

				s.push( calc( item[0], a, b ) );
			}
			else
				s.push( atof( item.c_str() ) );
		}

		std::cout << std::fixed << std::setprecision( 6 ) << s.top() << std::endl;
	}

	return 0;
}