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?