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

char in[100];
int main(){
	while(cin.getline(in,99)&&in[0]){
		stack<long double> s;
		char* c = in;
		do{
			if('0' <= *c && *c <= '9' || *c == '-' && '0' < c[1] && c[1] <= '9'){
				int a = 0;
				bool minus = false;
				if(c[0] == '0'){
					minus = true;
					++c;
				}
				while('0'<=*c && *c <= '9'){
					a *= 10;
					a += *c-'0';
					++c;
				}
				if(minus) a = -a;
				s.push((long double)a);
			}else{
				long double b = s.top();
				s.pop();
				long double a = 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;
			}
			++c;
		}while(*c);
		printf("%.6f\n",(double)s.top());
		memset(in,0,sizeof in);
	}
}