#include <iostream>
#include <cstdio>
#include <cstring>
#include <stack>
#include <cstdlib>
using namespace std;
stack<double> st;

double func(char c){
	double y = st.top();st.pop();
	double x = st.top();st.pop();
	//printf("%c %f %f ", c, x, y);
	if(c == '+')return x + y;
	if(c == '-')return x - y;
	if(c == '*')return x * y;
	if(c == '/')return x / y;
}

int main(){
	char s[100];
	while(scanf("%s", s) != EOF){
		if(strlen(s)==1 && (s[0]=='+' || s[0]=='-' || s[0]=='*' || s[0]=='/')){
			st.push(func(s[0]));
		}
		else{
			double d = atof(s);
			st.push(d);
		}
		if(getchar()=='\n'){
			printf("%.10f\n",st.top());
			st.pop();
		}
		//if(s[0] == ':')break;
		//printf("%d", strlen(s));
	}
	//st.pop();
	//printf("%.10f\n", st.top());
	//while(!st.empty()){printf("%.10f ", st.top());st.pop();}
	/*char s[10];
	scanf("%s", s);
	double a = atof(s);
	printf("%f", a);*/
	
	return 0;
}