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

stack <double> st;

int solve(char s){
    double a,b;
    b = st.top();
    st.pop();
    a = st.top();
    st.pop();
    if(s == '+') return (a+b);
    else if(s == '-') return (a-b);
    else if(s == '*') return (a*b);
    else if(s == '/') return (a/b);
    return 1;
}

int main(){
    int cnt = 0 ;
    char s[80];
    while(1){
    exit:
        cin >> s;
        cnt++;
        if(cin.eof()) break;
        if(getchar() == '\n'){
            if(cnt == 1){
                cout << s << endl;
                cnt = 0;
                goto exit;
            }
            st.push(solve(s[0]));
            printf("%.6f\n",st.top());
            st.pop();
            cnt = 0;
        }
        else if(!isalnum(s[0]) && !isalnum(s[1])) st.push(solve(s[0]));
        else st.push(atof(s));
    }
    return 0;
}