#include <bits/stdc++.h>
#include <string>
using namespace std;
vector<string> data;

vector<string> split(string& str, char delim) {
    stringstream ss(str);
    vector<string> res;
    string tmp;
    while(getline(ss, tmp, delim)) res.push_back(tmp);
    return(res);
}

double calc(double a, double b, char opr) {
    switch(opr) {
        case '+':return(a+b);
        case '-':return(a-b);
        case '*':return(a*b);
        case '/':return(a/b);
    }
    return(-1);
}

double solve() {
    stack<double> stk;
    for(int r = 0; r < data.size(); r++) {
        if(data[r][0] >= '0' && data[r][0] <= '9') { //整数値ならば
            stk.push(stof(data[r]));
        } else {
            double a = stk.top(); stk.pop();
            double b = stk.top(); stk.pop();
            stk.push(calc(b, a, data[r][0]));
        }
    }
    return(stk.top());
}

int main(void) {
    string operation;
    while(getline(cin, operation)) {
        data = split(operation, ' ');
        printf("%.6f\n", solve());
    }
    return(0);
}