import Text.Printf

poland :: [String]->[Double]->[Double]
poland [] stack = stack
poland (x:xs) stack
    | x=="+"    = poland xs (((stack!!1)+(stack!!0)):(drop 2 stack))
    | x=="-"    = poland xs (((stack!!1)-(stack!!0)):(drop 2 stack))
    | x=="*"    = poland xs (((stack!!1)*(stack!!0)):(drop 2 stack))
    | x=="/"    = poland xs (((stack!!1)/(stack!!0)):(drop 2 stack))
    | otherwise = poland xs ((read x::Double):stack)

solve :: String->IO ()
solve str = do
    printf "%.6f\n" $ head $ poland (words str) []

main :: IO ()
main = do
    ss <- getContents
    mapM_ solve $ lines ss