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


int main(){
    while (1){
	stack<double> st;
	string s;
	if (!getline(cin, s)) break;
	    
	for (int i = 0; i < s.size(); i++){
	    while (s[i] == ' ' && i < s.size()) i++;
	    if ('0' <= s[i] && s[i] <= '9'){
		double n = 0;
		while ('0' <= s[i] && s[i] <= '9'){
		    n *= 10;
		    n += s[i] - '0';
		    i++;
		}
		st.push(n);
		cout << st.top() << endl;
	    }
	    if (s[i] == '+' || s[i] == '-' || s[i] == '*' || s[i] == '/'){
		double b = st.top();
		st.pop();
		double a = st.top();
		st.pop();
		switch (s[i]){
		case '+':
		    st.push(a+b);
		    break;
		case '-':
		    st.push(a-b);
		    break;
		case '*':
		    st.push(a*b);
		    break;
		case '/':
		    st.push(a/b);
		    break;
		}
	    }
	}
	    
	printf("%.7lf\n", st.top());
    }
}