Below is a simplified scenario of a problem that I'm running into. There are 3 functions each wrapped with BaseForm[] and a default base of 10 is passed to each through the optional f parameter. Each function depends on the function before it.
Add[a_, b_, f_:10] := BaseForm[a + b, f]
MultSum[a_, b_, c_, f_:10] := BaseForm[Add[a, b]*c, f]
ExpMultSum[a_, b_, c_, d_, f_:10] := BaseForm[MultSum[a, b, c]^d, f]
Please be aware the functions above have nothing to do with what I'm trying to accomplish. They only exist to highlight the issue that I am encountering.
I intentionally avoid passing in the f to the earlier functions because the output format isn't parseable by the caller. Add[] works fine, as does MultSum[], but once we get to ExpMultSum[] the Mathematica 9 parser appears to hit some internal limitation and stops evaluating the expression:
Add[2, 2]
4
MultSum[2,2,2]
8
ExpMultSum[2, 2, 2, 2]
8²
My best guess is that there is a nesting limitation? The only solution I can come up with is to move the BaseForm outside the function and wrap each call (ex. BaseForm[Add[2, 2],10]). Is there a known workaround so I can keep the BaseForm internal to the function?

BaseForm[]is only intended for output formatting. Why not do your arithmetic conventionally, and reserveBaseForm[]when you're ready to display output? – J. M.'s missing motivation Nov 26 '15 at 05:55BaseForm[expression,n]it was convenient to add it to the function itself. – Dustin Darcy Nov 26 '15 at 05:58$PrePrintto have your output be always printed in base $k$ form, for some globally set value ofk. – J. M.'s missing motivation Nov 26 '15 at 06:17Add[a_, b_, f_: 10] := Module[{}, $PrePrint = BaseForm[#1, f] &; Return[a + b]; $PrePrint =.]But that isn't possible before the return unless there is a mechanism to defer execution or to always execute cleanup code following a module call. – Dustin Darcy Nov 26 '15 at 08:44Add[]and sometimes view it in Base-2. Then in other scenarios we want to use it normally in Base-10.Add[]is a primitive for more complicated operations where presentation isn't necessary. So there is no need to pass in a BaseForm value.Add[]gets used inMultSum[], which we occasionally want to view in a different base, andMultSum[]gets used inExpMultSum[]which we also would like to sometimes view in something other than base-10. Putting the BaseForm[] in the function is purely a macro to save keystrokes and for readability of long expressions. – Dustin Darcy Nov 26 '15 at 09:25MultSum[a_, b_, c_, f_:10] := BaseForm[Add[a, b]*c, f]. Notice the "base" of MultSum'sfisn't passed in toAdd[].Add[]uses the default value off:10as defined in the function declarationAdd[a_, b_, f_:10]. – Dustin Darcy Nov 26 '15 at 10:10BaseForm[...]. If you doFullForm[...]of the outputs this will become more clear. – Daniel Lichtblau Nov 26 '15 at 15:25MatrixForm[]. As in "Why doesn'tmat={{1,2},{3,4}}//MatrixForm;RowReduce[mat]work?". Same issue. – Daniel Lichtblau Nov 26 '15 at 15:28BaseForm[expression,10]should be treated differently than any other output, other than that it is being processed through a formatting function? It would be handy if there was a way to selectively disable the outer BaseForm wrapper when using the default case (perhaps through a property?). – Dustin Darcy Nov 26 '15 at 17:58BaseForm[expr,10]formats without the "sub_10" part in contrast to other bases. But that's in the formatting handler. The fact isXXXFormwrappers do not go away, so functions that see them in input need to be prepared for handling them. – Daniel Lichtblau Nov 26 '15 at 18:25XXXFormas a pass through. Thank you for your insight Daniel. – Dustin Darcy Nov 26 '15 at 19:06BaseForm[number,10]does not become transformed tonumber. It might be an oversimplification, but it would be useful to regard evaluation and formatting as separate things. Maybe regard formatting as a side effect. – Daniel Lichtblau Nov 29 '15 at 17:03