#include<iostream>
#include<cstdio>
#include<string>
#include<stack>
using namespace std;
int main(){
  string r;
  while(getline(cin,r)){
    r+=' ';
    double x = 0;
    stack <double> num;
    char ord = 'k';
    for(int i=0; i<r.size(); i++){
      if(r[i] == ' '){
	if(ord == 'k'){
	  num.push(x);
	  x = 0;
	}
	else{
	  double a = num.top();
	  num.pop();
	  double b = num.top();
	  num.pop();
	  if(ord == '+'){num.push(b+a);}
	  if(ord == '-'){num.push(b-a);}
	  if(ord == '/'){num.push(b/a);}
	  if(ord == '*'){num.push(b*a);}
	  ord = 'k';
	}
      }
      else if(r[i]>='0' && r[i]<='9'){
      	x = x*10+r[i]-'0';
      	if(ord == '-'){x = -x;ord = 'k';}
      }
      else{ord = r[i];}
    }
    printf("%.6lf\n",num.top());
  }
  return 0;
}