#include <iostream>
#include <stack>
#include <cstdio>
#include <cstring>
using namespace std;

int main(){
        char in[100] = {}; 
        while(cin.getline(in,99)&&in[0]){
                stack<double> s;
                char* c = in; 
                do{ 
                        if('0' <= *c && *c <= '9'){
                                int a = 0;
                                while('0'<=*c && *c <= '9'){
                                        a *= 10; 
                                        a += *c-'0';
                                        ++c;
                                }   
                                s.push((double)a);
                        }else{
                                double b = s.top();
                                s.pop();
                                double a = s.top();
                                s.pop();
                                switch(*c){
                                        case '+':
                                                s.push(a+b);
                                                break;
                                        case '-':
                                                s.push(a-b);
                                                break;
                                        case '*':
                                                s.push(a*b);
                                                break;
                                        case '/':
                                                while(b == 0); 
                                                s.push(a/b);
                                                break;
                                }   
                                ++c;
                        }   
                        ++c;
                }while(*c);
                printf("%.6f\n",s.top());
                memset(in,0,sizeof in);
        }   
}