#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cctype>
#include<complex>
#include<iostream>
#include<algorithm>
#include<functional>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<map>

using namespace std;
const int dx[] = {1,0,-1,0},dy[] = {0,1,0,-1};
#define INF 999999
#define rep(i,j) for(int i=0;i<(j);++i)
#define reps(i,j,k) for(int i=j;i<k;++i)
typedef long long ll;
typedef unsigned long long ull;

int main(){
	char c[120]={0};
	string str;
	int cnt = 0;
	bool f = false;
	while(getline(cin,str) && str != ""){
	    str += " ";
        stack< double > S;
		int len = str.size();
		rep(i,len){
			if(str[i] == '+'){
				double a = S.top();
				S.pop();
				double b = S.top();
				S.pop();
				S.push(b+a);
			}
			else if(str[i] == '-'){
				double a = S.top();
				S.pop();
				double b = S.top();
				S.pop();
				S.push(b-a);
			}
			else if(str[i] == '*'){
				double a = S.top();
				S.pop();
				double b = S.top();
				S.pop();
				S.push(b*a);
			}
			else if(str[i] == '/'){
				double a = S.top();
				S.pop();
				double b = S.top();
				S.pop();
				if(a == 0)continue;
				S.push(b/a);
			}
			else if(str[i] == ' '){
				if(f)S.push(atof(c));
				f = false;
				cnt = 0;
				memset(c,0,sizeof(c));
			}
			else if(str[i] > 47 && str[i] < 58){
				f = true;
				c[cnt] = str[i];
				cnt++;
			}
		}
		printf("%lf\n",S.top());
		S.pop();
	}
	return 0;
}