#include<stdio.h>
#include<string.h>
double ds[100];
int sp=100;
void push(double v) { if(sp>0) ds[--sp]=v; }
double pop(void) { return (sp<100?ds[sp++]:0.0); }
double RPN( const char * f ){
    double v,g;
    for(;*f;f+=2) {
        switch(*f){
        case '+':v=pop();push(pop()+v); break;
        case '*':v=pop();push(pop()*v); break;
        case '/':v=pop();push(pop()/v); break;
        case '-':if(*(f+1)==' '){v=pop();push(pop()-v);break;}
        default :
            g=0;
            if(*f=='-'){g=-1;f++;}
            for(v=0;*f>='0'&&*f<='9';v=v*10+(*f-'0'),f++);f--;
            push(v) ;
            break ;
        }
    }
    return pop();
}
int main(void){
    char s[82];
    while(fgets(s,sizeof(s),stdin)){
        printf("%f\n",RPN(s));
    }
    return 0;
}