#include <iostream>
#include <iomanip>
#include <cassert>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <sstream>
#include <istream>
#include <cmath>
#include <cstdio>
#include <complex>

using namespace std;

#define vci vector<int>
#define vcs vector<string>
#define pb push_back
#define sz size()
#define mapii map<int, int>
#define mapci map<char, int>
#define mapsi map<string, int>
#define all(x) x.begin(), x.end()
#define minit(a, i) memset(a, i, sizeof(a));

#define for_(i, a, b) for (int i=(int)a; i<(int)b; i++)
#define for_d(i, a, b) for (int i=(int)a-1; i>=b; i--)
#define for_r(i, a, b, c) for (int i=(int)a; i<(int)b; i += c)
#define for_dr(i, a, b, c) for (int i=(int)a-1; i>=b; i -= c)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template <class T> int __builtin_popcount(T n) { return n ? 1 + __builtin_popcount(n & (n - 1)) : 0; }

typedef long long ll;
typedef double D;

const int iINF = 2147483647;
const ll lINF = 9223372036854775807;

template <class T> inline void dbg(T t) { cout << t << endl; }


ll sti(string s) {
	ll len = s.length();
	if (len < 1) return 0;
	return (s[len - 1] - '0') + 10 * (sti(s.substr(0, len - 1)));
}

/***
split by t
***/
vcs splitAll(string s, string t) {
	vcs r;
	for (int p = 0; (p = s.find(t)) != s.npos;) {
		r.pb(s.substr(0, p));
		s = s.substr(p + t.size());
	}
	r.pb(s);
	return r;
}

int main() {
	string input;
	
	while (1) {
		getline(cin, input);
		if (input == "") break;
		
		vcs porl = splitAll(input, " ");
		
		stack<D> s;
		int n = (int)porl.sz;
		for_(i, 0, n) {
			string c = porl[i];
			D s1, s2;
			if (c[0]=='-') {
				s1 = s.top(); s.pop();
				s2 = s.top(); s.pop();
				s.push(s2-s1);
			} else if (c[0]=='+') {
				s1 = s.top(); s.pop();
				s2 = s.top(); s.pop();
				s.push(s2+s1);
			} else if (c[0]=='*') {
				s1 = s.top(); s.pop();
				s2 = s.top(); s.pop();
				s.push(s2*s1);
			} else if (c[0]=='/') {
				s1 = s.top(); s.pop();
				s2 = s.top(); s.pop();
				s.push(s2/s1);
			} else {
				s.push((D)sti(c));
			}
		}
		
		if (cin.eof()) break;
		printf("%lf\n", s.top()); s.pop();
	}
	
	return 0;
}