#include<iostream>
#include<string>
#include<sstream>
#include<stack>
#include<cstdio>
#include<cstdlib>
using namespace std;
int main(void){
  stack<double> s;
  string a,d;
  double x,y;
  while(getline(cin,d)){
    for(;!s.empty();) s.pop();
    stringstream ss(d);
    while(ss >> a){
      if(a=="+" || a=="-" || a=="*" || a=="/"){
	y=s.top(),s.pop();
	x=s.top(),s.pop();
	if(a=="+") s.push(x+y);
	else if(a=="-") s.push(x-y);
	else if(a=="*") s.push(x*y);
	else if(a=="/") s.push(x/y);
      }
      else s.push(atof(a.c_str()));
    }
    printf("%.6f\n",s.top());
  }
}
