#include<cstdio>
#include<algorithm>
#include<iostream>
#include<vector>
#include<cstring>
#include<stack>
#include<queue>
#include<string>
#include<map>
using namespace std;
stack<char>s1;
stack<double>s2;
queue<string>q;
string str;
map<char,int>m1;
void tosuffix()
{
int i=0;
string temp;
while(i<str.length()){
if('0'<=str[i]&&str[i]<='9'){
temp.clear();
while(str[i]!=' '&&str[i]){
temp+=str[i];
i++;
}
q.push(temp);
}
else if(str[i]!=' '){
if(s1.empty()||m1[s1.top()]<m1[str[i]]){
s1.push(str[i]);
}
else{
while(!s1.empty()&&m1[s1.top()]>=m1[str[i]]){
string temp;
temp+=s1.top();
q.push(temp);
s1.pop();
}
s1.push(str[i]);
}
i++;
}
i++;
}
while(!s1.empty()){
string temp;
temp+=s1.top();
q.push(temp);
s1.pop();
}
}
void read(string& str)
{
char c;
while(scanf("%c",&c),c!='\n'){
str+=c;
}
}
void fun(string str)
{
double sum=0;
for(int i=0;i<str.size();i++){
sum=sum*10+(str[i]-'0');
}
s2.push(sum);
}
void process(char x)
{
double a,b;
b=s2.top();
s2.pop();
a=s2.top();
s2.pop();
if(x=='+'){
s2.push(a+b);
}
else if(x=='-'){
s2.push(a-b);
}
else if(x=='*'){
s2.push(a*b);
}
else if(x=='/'){
s2.push(a/b);
}
}
int main()
{
m1['+']=1;
m1['-']=1;
m1['*']=2;
m1['/']=2;
while(getline(cin,str),str!="0"){
while(!s2.empty()){
s2.pop();
}
while(!s1.empty()){
s1.pop();
}
while(!q.empty()){
q.pop();
}
tosuffix();
while(!q.empty()){
if('0'<=q.front()[0]&&q.front()[0]<='9'){
fun(q.front());
}
else{
process(q.front()[0]);
}
q.pop();
}
printf("%.2f\n",s2.top());
}
return 0;
}