import std.stdio,std.string,std.conv,std.array,std.range;

int main()
{
	string s;
	while((s = readln.chomp).length != 0)
	{
		string[] _s = s.split(" ");
		double[] stack;
		foreach(i;0.._s.length)
		{
			if(_s[i] == "+")
			{
				double temp = stack.back;
				stack.popBack;
				double temp2 = stack.back;
				stack.popBack;
				stack ~= temp2 + temp;
			}
			else if(_s[i] == "-")
			{
				double temp = stack.back;
				stack.popBack;
				double temp2 = stack.back;
				stack.popBack;
				stack ~= temp2 - temp;
			}
			else if(_s[i] == "*")
			{
				double temp = stack.back;
				stack.popBack;
				double temp2 = stack.back;
				stack.popBack;
				stack ~= temp2 * temp;
			}
			else if(_s[i] == "/")
			{
				double temp = stack.back;
				stack.popBack;
				double temp2 = stack.back;
				stack.popBack;
				stack ~= temp2 / temp;
			}
			else
			{
				stack ~= _s[i].to!double;
			}
		}
		writefln("%.6f",stack.back);
	}
	return 0;
}