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

using namespace std;

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

	while(cin.getline( str, 80 )){
		char *t;

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

		t = strtok( str, " " );
		if( strcmp(t , "+" ) == 0){
			a = data.top();
			data.pop();
			b = data.top();
			data.pop();
			data.push( b + a );
		} else if( strcmp(t , "-" ) == 0){
			a = data.top();
			data.pop();
			b = data.top();
			data.pop();
			data.push( b - a );
		} else if( strcmp(t , "/")  == 0){
			a = data.top();
			data.pop();
			b = data.top();
			data.pop();
			data.push( b / a );
		} else if(( strcmp(t, "*" ) == 0)){
			a = data.top();
			data.pop();
			b = data.top();
			data.pop();
			data.push( b * a );
		} else {
			data.push( atof( t ) );
		}

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

	}
	return 0;
}