#include <iostream>
#include <stack>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <sstream>
#include <cmath>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;


int main(void){

string ws,wk;
	while(getline(cin,ws)){

		stack<double> stki;
		
		stringstream zz(ws);
		double z3=0;
		

		while(zz >> wk){
			if(wk == "+" || wk == "-" || wk == "*"  || wk == "/" ) {
				if(stki.empty()) break;
				double z1 = stki.top();
				stki.pop();
				double z2 = stki.top();
				stki.pop();
				z3=0;
				if(wk=="+") z3 = z2 + z1;
				if(wk=="-") z3 = z2 - z1;
				if(wk=="*") z3 = z2 * z1;
				if(wk=="/") z3 = z2 / z1;
//				printf("z2=%f,z1=%f, z3=%f ",z2,z1,z3);
				stki.push(z3);
				
			}else{
//				stringstream wqq(wk);
//				wqq >> z3;
//				stki.push(z3);
				stki.push(atof(wk.c_str()));
				
			}
		}
		if(cin.eof()) break;
//		printf("%.6lf\n",z3);
		printf("%.6lf\n",stki.top());
	}

	return 0;
	
}