#include<stdio.h>
#include<stack>
#include<ctype.h>
#include<stdlib.h>
int main()
{
	char str[99],*p,*np;
	while(fgets(str,99,stdin) && !isspace(str[0]))
	{
		std::stack<double> s;
		for(p=str;*p;++p)
		{
			if(isspace(*p))continue;

			double u,v=strtod(p,&np);
			if(p!=np) s.push(v),p=np-1;
			else
			{
				u=s.top(),s.pop(),v=s.top(),s.pop();
				if(*p=='+') s.push(v+u);
				else if(*p=='-') s.push(v-u);
				else if(*p=='*') s.push(v*u);
				else if(*p=='/') s.push(v/u);
			}
		}
		printf("%f\n",s.top());
	}
	return 0;
}

//üÍ³ê½t|[hL@ðvZ¹æ
//EEEÇÌZqð·êÎ¢¢ñÅ·©ËH
//»µÄAuvÆÍÇñÈàÌðwµÄ¢éñÅ·©Ë¦