In mathematical writing, constants usually come before variables, such as $2x$ or $\pi x$. In integration, most mathematicians write $f(x)dx$ instead of $dx f(x)$ to prevent confusion of where the differential form inside an integral ends and a potential new multiplication begins.
For two constants, I think square roots should come after other variables or constants such as $\pi\sqrt{2}$ or even $x\sqrt{2}$, breaking the convention that variables should come after constants, simply because when one is writing by hand it's possible to get confused whether one wrote $\sqrt{2}x$ or $\sqrt{2x}$. I would also write $xe^x$ vs $e^xx$.
Google AI Overview efficiently summarized the following rule: "In English, adjectives typically follow a specific order when multiple adjectives are used to describe a noun. The general order is: Opinion - Size - Age - Shape - Color - Origin - Material - Purpose."
Is there a definitive linguistic summary for order of multiplication/other operations that commute mathematically but we want to order it for clarity? Mathematically, what is the poset structure $a\le b$ denoting "$a$ is written before $b$" used by most mathematicians for constants/symbols/functions etc?
I imagine there is such a poset, but I haven't thought much about what that order is, nor how definitive it would actually be. As a first approximation, I imagine it is something like $$ \cdots \le \text{ integers }\le \text{ noninteger rationals }\le \cdots \le\text{ variables and integer powers of variables }\le \cdots \le \text{ exponents with variables }\le \cdots \le\text{ square roots}\le\cdots\le \text{ cube roots }\le \cdots.$$
Edit: some minor details. Also phrased this question more mathematically to potentially raise interest.