#include<iostream>
#include<sstream>
#include<vector>
#include<stack>
#include <iomanip>

using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}


vector<string> split(const string &str, char delim){ 
  vector<string> res; 
  size_t current = 0, found; 
  while((found = str.find_first_of(delim, current)) != string::npos){ 
    res.push_back(string(str, current, found - current)); 
    current = found + 1; 
  } 
  res.push_back(string(str, current, str.size() - current)); 
  return res; 
}

int main()
{
  string str;
  for(;getline(cin,str);)
    {
      vector<string> data=split(str,' ');
      stack<double, vector<double> > st;
      for(int i=0;i<data.size();i++)
	{
	  double tmp;
	  string ss=data[i];
	  if(ss[0]>='0' && ss[0]<='9')
	    tmp=(double)toInt(ss);
	  else
	    {
	      double data2=st.top();st.pop();
	      double data1=st.top();st.pop();
	      if(ss[0]=='+')
		tmp=data1+data2;
	      else if(ss[0]=='-')
		tmp=data1-data2;
	      else if(ss[0]=='*')
		tmp=data1*data2;
	      else if(ss[0]=='/')
		tmp=data1/data2;
	    }
	  st.push(tmp);
	}
      cout<< fixed << setprecision(6);
      cout<<st.top()<<endl;
      st.pop();
    }
}