Fundamental arithmetic operations for use with rpnfcn()
Command name Argument
These functions perform the four fundamental arithmetic operations on the two top elements of the stack. They remove the top element and replaces the upper but one element with the result of the operation, i.e. the number of elements in the stack are reduced by one and the result is the new top element. All four perform their operations element-wise without checking for conformability as they rely on the Mata colon operators :+, :-+, :*, and :/, see Mata colon operators. &subtract() subtracts the current top element of the stack element from the element just below, ÷() divides the upper but one element of the stack with the top element.
Henrik StÝvring, Research Unit of General Practice, University of Southern Denmark. Please email email@example.com if you have comments, questions or observe any problems.
Manual: [M] Mata Reference Manual
Online: help for [M-0] mata, Evaluation of algorithm matrix using RPN, RPN stack manipulation functions, RPN distribution functions, RPN functions for integration