Calculates the result of an arithmetic expression in Reverse Polish Notation (RPN) for performing mathematical computations.