#include <iostream>
#include <stack>
#include <cstdio>
#include <cstring>
using namespace std;

int main() {
	stack<double> s;
	char str[128];

	while(1) {
		fgets(str, sizeof(str), stdin);
		if(feof(stdin))
			break;

		while(s.size())
			s.pop();

		for(int i = 0; str[i] && str[i] != '\n'; i++) {
			if('0' <= str[i] && str[i] <= '9') {
				double p = 0;
				int j;

				for(j = 0; str[i + j] && str[i + j] != ' ' && str[i + j] != '\n'; j++) {
					p *= 10;
					p += str[i + j] - '0';
				}

				s.push(p);
				i += j;
			}

			else {
				double r, l;
				double p;
				r = s.top(); s.pop();
				l = s.top(); s.pop();

				switch(str[i]) {
					case '+':
						p = l + r;
						break;
					case '-':
						p = l - r;
						break;
					case '*':
						p = l * r;
						break;
					case '/':
						p = l / r;
						break;
				}
				s.push(p);
				i++;
			}
		}
		printf("%f\n", s.top());
	}
}