#define	_USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <string>
#include <set>
using namespace std;
int main(){
	
	string s;
	stack<double> que;
	while(getline(cin,s)){
		while(!que.empty()){
			que.pop();
		}
		string e="";
		for(int i=0;i<s.size();i++){
			if(s[i]>='0'&&s[i]<='9'){
				e=e+s[i];
			}
			else if(s[i]==' '){
				if(e!=""){
				que.push(stoi(e));
				e="";
				}
			}
			else{
				double sum=0;
				double b=que.top();
				que.pop();
				double a=que.top();
				que.pop();
				if(s[i]=='-')
					sum=a-b;
				else if(s[i]=='+')
					sum=a+b;
				else if(s[i]=='*')
					sum=a*b;
				else if(s[i]=='/')
					sum=a/b;
				que.push(sum);
			}
			
		}
		printf("%.6lf\n",que.top());

	}
	
}