#include<iostream>
#include<string>
#include<sstream>
#include<stack>
#include<cmath>
#include<iomanip>
using namespace std;

int main()
{
	string s;
	stringstream ss;
	stack<double> stack;
	double a, b;

	cout<<setprecision(6);
	cout<<setiosflags(ios::fixed);

	while (getline(cin, s)) {
		ss.str(s);
		while (ss>>s) {
			if ( atoi(s.c_str()) ){
				stack.push( atof(s.c_str()) );
			} else {
				b = stack.top();
				stack.pop();
				a = stack.top();
				stack.pop();
				if (s=="+") stack.push(a+b);
				else if (s=="-") stack.push(a-b);
				else if (s=="*") stack.push(a*b);
				else if (s=="/") stack.push(a/b);
			}
		}
		cout<<stack.top()<<endl;
		stack.pop();
		ss.clear();
	}
	return 0;
}