#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <list>
#include <iostream>
#include <climits>
#include <cfloat>

using namespace std;

int main()
{
	char buf[128];
	while (!cin.eof())
	{
		cin.getline(buf, sizeof(buf));
		if (strlen(buf) == 0)
			break;

		stack<double> s;
		for (char* p = strtok(buf, " "); p; p = strtok(NULL, " "))
		{
			if (isdigit(*p) || strlen(p) >= 2)
				s.push(atof(p));
			else
			{
				double a, b;
				b = s.top(); s.pop();
				a = s.top(); s.pop();
				double res;
				if (*p == '+')
					res = a + b;
				else if (*p == '-')
					res = a - b;
				else if (*p == '*')
					res = a * b;
				else if (*p == '/')
					res = a / b;
				s.push(res);
			}
		}
		printf("%.6f\n", s.top());
	}

	return 0;
}