Yep, this is understandable - I actually noticed and appreciated the accuracy in such constrained circumstances.
Ouch, this is worse than I thought then. Must keep this in mind when regex substituting to a more complex formula. I guess it's something normal for a parser based (or not?) on recursivity (I suppose that's where the stack limiting comes into play, if I'm not mistaken).
Anyway, in this particular case, your "(10+10)" hint along with the "parser of alternatives" from my brain directed me to another, much more forgiving approach (this is a max of 512 values that works):
Code: Select all
Formula=Max(Max(Max(Max(Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))))),Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))))),Max(Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))))),Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))))))),Max(Max(Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))))),Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))))),Max(Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))))),Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))))))),Max(Max(Max(Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))))),Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))))),Max(Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))))),Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))))))),Max(Max(Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))))),Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))))),Max(Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))))),Max(Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))),Max(Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7))),Max(Max(Max(12.9,12.7),Max(12.9,12.7)),Max(Max(12.9,12.7),Max(12.9,12.7)))))))))
and so forth, which, judging by the number of brackets in the other non-working example, has the potential to support a maximum from 2^47 = 140 737 488 355 328 values, if my calculations are correct. Now all I need to do is figure out an optimal way to regex substitute an "A,B,C,D"-like string into a "Max(Max(A,B),Max(C,D))"-like one, but that shouldn't be a problem.