#include <cstdio>
#include <stdlib.h>
#include <stack>
#include <iostream>

using namespace std;

int main(int argc, char const* argv[])
{
	char str[81];
	stack<double> data;
	double a,b;

	while( 1 ){
		gets( str );
		char *t;

		while( data.empty() == false ) data.pop();

		t = strtok( str, " " );
		if( t[0] < '0' || t[0] > '9' ){
				a = data.top();
				data.pop();
				b = data.top();
				data.pop();
			if( t[0] == '+' ){
				data.push( b + a );
			}
			if( t[0] == '-' ){
				data.push( b - a );
			}
			if( t[0] == '/' ){
				data.push( b / a );
			}
			if( t[0] == '*' ){
				data.push( b * a );
			}
		} else {
			data.push( atof( t ) );
		}

		while( ( t = strtok( NULL, " " ) ) != NULL ){
			if( t[0] < '0' || t[0] > '9' ){
				a = data.top();
				data.pop();
				b = data.top();
				data.pop();
				if( t[0] == '+' ){
					data.push( b + a );
				}
				if( t[0] == '-' ){
					data.push( b - a );
				}
				if( t[0] == '/' ){
					data.push( b / a );
				}
				if( t[0] == '*' ){
					data.push( b * a );
				}
			} else {
				data.push( atof( t ) );
			}
		}
		printf("%.6f\n",data.top());
		data.pop();

	}
	return 0;
}