#include <iostream>
#include <cstdio>
#include <cctype>
#include <stack>
#include <sstream>
#include <cstdlib>
#include <algorithm>
#include <cstring>
using namespace std;

int main(void){
  string str;
  while(getline(cin, str)){
    stringstream ss(str);
    stack<double> num;
    while(ss >> str){
      if(isdigit(*str.rbegin())){
        num.push(atof(str.c_str()));
      }else{
        double b = num.top(); num.pop();
        double a = num.top(); num.pop();
        double res = 0;
        switch(str[0]){
          case '+': res = a + b; break;
          case '-': res = a - b; break;
          case '*': res = a * b; break;
          case '/': res = a / b; break;
        }
        num.push(res);
      }
    }
    printf("%.6lf\n", num.top());
    num.pop();
  }
  return 0;
}