Thanks for the fix. Is applying the fix something an ordinary Moodle admin can easily do? What would the procedure be?
I found another example of wrong validation, when trying to work around the minus sign suppressing the remainder of the term. I don't know if that is handled by the fix. See attached image.
Seems to be spurious asterisk insertion. Conversion of a leading whitespace in front of an existing asterisk results in **, which is misunderstood as exponentiation.
On top of this, the term 1^N is interpreted as unitless (indicated by recognised units [N,]) but strictly speaking, the unit of the last term would be 1^N (whatever this physically would be). In fracture mechanics, you have MPa*sqrt(m) for stress intensity , thus the base units aren't always in integer powers. Yet, fixing this is at most nice to have, probably not worth spending work on it.