#include <iostream>
#include <stack>
#include <cstdio>

using namespace std;

int main(){
	stack<double> s;
	char in[100] = {};
	while(cin.getline(in,99)){
		char* c = in;
		do{
			if('0' < *c && *c <= '9'){
				int a = 0;
				int i = 0;
				while('0'<=*c && *c <= '9'){
					a *= 10;
					a += *c-'0';
					++c;
				}
				s.push((double)a);
			}else{
				double a = s.top();
				s.pop();
				double b = s.top();
				s.pop();
				switch(*c){
					case '+':
						s.push(a+b);
						break;
					case '-':
						s.push(a-b);
						break;
					case '*':
						s.push(a*b);
						break;
					case '/':
						s.push(a/b);
						break;
				}
				++c;
			}
		}while(*(++c));
		printf("%.6f\n",s.top());
	}
}