The Wikipedia article on Fractions says:
If, in a complex fraction, there is no unique way to tell which fraction lines takes precedence, then this expression is improperly formed, because of ambiguity. So 5/10/20/40 is not a valid mathematical expression, because of multiple possible interpretations [...]
The first sentence makes sense, but does the second sentence follow? WolframAlpha interprets that input without issue, as do popular programming languages.
Is the order of operations not accepted in formal math?