#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<stack>
#include<ctype.h>

using namespace std;

double sum(double a,double b){ return a+b; }
double dif(double a,double b){ return a-b; }
double mul(double a,double b){ return a*b; }
double div(double a,double b){ return a/b; }
double (*ops[])(double,double)={sum,dif,mul,div};

int main(){
  int i;
  char in[256],*ind,op[]={'+','-','*','/'};
  stack<double> st;
  double p1,p2;

  while(fgets(in,256,stdin)!=NULL){
    for(ind=strtok(in," ");ind!=NULL;ind=strtok(NULL," ")){
      for(i=0;i<4;i++)
	if(op[i]==ind[0]&&!isdigit(ind[1])){
	  p1=st.top();
	  st.pop();
	  p2=st.top();
	  st.pop();
	  st.push(ops[i](p2,p1));
	  goto jump;
	}
      st.push(atof(ind));
    jump:;
    }
    printf("%.6lf\n",st.top());
    st.pop();
  }
  return 0;
}