#include<iostream>
#include<string>
#include<vector>
#include<algorithm>

using namespace std;

vector<string> Devide(string);
double Calcurate(vector<string>);
int Atoi(const string);

int main(){
  int i;
  double ans;
  string str;
  vector<string> data;

  while(getline(cin, str)){
    data = Devide(str);
    ans = Calcurate(data);
    cout.setf(ios::fixed, ios::floatfield);
    cout.precision(6);
    cout << ans << endl;
  }

  return 0;
}

vector<string> Devide(string s){
  string _s;
  vector<string> data;
  string::iterator i, j;

  i = s.begin();
  while(1){
    j = find(i, s.end(), ' ');
    copy(i, j, back_inserter(_s));
    data.push_back(_s);
    _s.clear();

    if(j == s.end()) break;
    i = j+1;
  }

  return data;
}

double Calcurate(vector<string> s){
  int i, y;
  double x;
  vector<double> data;

  for(i=0; i<s.size(); ++i){
    if(s[i] == "+" || s[i] == "-" || s[i] == "*" || s[i] == "/"){
      if(s[i] == "+")
	x = data[data.size()-2] + data[data.size()-1];
      else if(s[i] == "-")
	x = data[data.size()-2] - data[data.size()-1];
      else if(s[i] == "*")
	x = data[data.size()-2] * data[data.size()-1];
      else if(s[i] == "/")
	x = data[data.size()-2] / data[data.size()-1];

      data.pop_back();
      data.pop_back();
      data.push_back(x);

    }else{
      y = Atoi(s[i]);
      data.push_back((double)y);
    }
  }

  return data[0];
}

int Atoi(const string s){
  int i, x=0, digit=1;

  for(i = s.size()-1; i >= 0; --i){
    x = x + (s[i] - 48) * digit;
    digit *= 10;
  }
  return x;
}