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


int main(){
    while (1){
	stack<double> st;
	while (1){
	    char c;
	    string s;
	    getline(cin, s);
	    for (int i = 0; i < s.size(); i++){
		while (s[i] == '0' && 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);
		}
		while (s[i] == '0' && i < s.size()) i++;
		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());
	}
    }
}