#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cstring>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
static const double EPS = 1e-5;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
double cal(double a, double b , string w){
  if(w=="+")
    return a+b;
  if(w=="-")
    return a-b;
  if(w=="*")
    return a*b;
  if(w=="/")
    return a/b;
}

int main(void){
  string line;
  while(getline(cin,line)){
    if(line=="") break;
    stack<double> stq;
    string word;
    stringstream ss;
    ss<<line;
    while(ss>>word){
      if(word=="+"||word=="-"||word=="*"||word=="/"){
        double a,b;
        b = stq.top();
        stq.pop();
        a = stq.top();
        stq.pop();
        stq.push(cal(a,b,word));
      }else{
        double n = atof(word.c_str());
        stq.push(n);
      }
    }
    printf("%.6lf\n",stq.top());
  }
  return 0;
}