Define and use doVarsArithmetic2
Document algorithm stackFrames