#include<iostream>
#include<stack>
#include<algorithm>
#include<string>
#include<cstdio>
using namespace std;

double a,b,n,z;
string s;
stack < double > d;

void solve(char c){
  a = d.top();
  d.pop();
  b = d.top();
  d.pop();

  if(c == '+'){
    n = b + a;
    d.push(n);
  }
  else if(c == '-'){
    n = b - a;
    d.push(n);
  }
  else if(c == '*'){
    n = b * a;
    d.push(n);
  }
  else if(c == '/'){
    n = b / a;
    d.push(n);
  }
}

int main(){

  while(getline(cin,s)){
    z = 0;

    for(int i=0;i<s.size();i++){
      if(s[i] >= '0' && s[i] <= '9'){
	z *= 10;
	z += s[i]-'0';
      }
      else if(s[i] == ' ' && (s[i-1] >= '0' && s[i-1] <= '9')){
	d.push(z);
	z = 0;
      }
      else if(s[i] == '+' || s[i] == '-' || s[i] == '*' || s[i] == '/') solve(s[i]);
    }

    printf("%.7f\n",d.top());

    while(!d.empty()) d.pop();

  }
}