#include <iostream>
#include <sstream>
#include <stack>
#include <string>
#include <cstdio>
#include <cstdlib>
using namespace std;

int main()
{
	string str;
	char c,s; double t,x,y;

	while(getline(cin,str))
	{
		stringstream ss;
		ss << str;

		stack<double> buf;
		while(ss >> str)
		{
			if('0'<=str[0] && str[0]<='9')
			{
				buf.push(atof(str.c_str()));
			}
			else
			{				
				y=buf.top(); buf.pop();
				x=buf.top(); buf.pop();
				switch(str[0])
				{
					case '+': t=x+y; break;
					case '-': t=x-y; break;
					case '*': t=x*y; break;
					case '/': t=x/y; break;
				}
				buf.push(t);
			}
		}

		printf("%.6lf\n",buf.top());
	}
}