Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Here is a misbehaviour (already present in real Mathcad, too) that I would classify as a bug, since IMHO an implicit multiplication should be treated exactly the same as an explicitly stated one. An implicit multiplication should be just that and nothing more, not additionally an implicit pair of parenthesis, too.
And, yes, I am aware that some authors use different parsing rules and give priority to implicit multiplications over "normal" multiplications and divisions. But I am not aware of a reliable source that would give implicit multiplication a special place in the order of operators. Although no authoritative literature, Wikipedia also does not grant implicit multiplications a special position. https://en.wikipedia.org/wiki/Order_of_operations
May well lead to endless discussions ... (just search the net for 6:2(1+2)=? ) 🙂
@Werner_E wrote:
Here is a misbehaviour (already present in real Mathcad, too) that I would classify as a bug, since IMHO an implicit multiplication should be treated exactly the same as an explicitly stated one.
And, yes, I am aware that some authors use different parsing rules and give priority to implicit multiplications over "normal" multiplications and divisions. May well lead to endless discussions ...
Your interpretation would seem to be supported by the Prime 8 Help, Werner.
Is there any difference between the numerical and symbolic engines?
No, consistent behaviour
I hardly ever use that inline division operator so its not a big deal - I stumbled over this bug in another forum.
I also am curious if someone can point me to a trustworthy source which defines that different parsing rule where implicit multiplications have precedence over "normal" ones. I have always seen it as a simple abbreviation laid down in a standard.
Thats not implicit multiplication but hex postfix.
Ерфтлы, Werner, I know.
Good principle.
Not equal, but similar.
Erftly one more!
We need 20 : 4 = 5 in Russia!
Mathcad 11:
Conclusion: the bug is due to the use of the inline division.
To prevent the bug, do not use the inline division operator.
Here's what a standard (ISO 80000-1) says about this topic:
I guess the 'solidus' is the 'inline division' operator in Mathcad.
If you must use it, follow the standard, that is:"a solidus shall not be followed by a multiplication sign or a division sign..."
Further, ISO 80000-2 has:
Luc
I can only second the suggestion of the standard to avoid confusion by adding (mathematically not mandatory) parenthesis for clarity.
But even if you don't do so, the normal rules of math concerning precedence of operators must apply. Division and multiplication are on the same level and so must be applied following the left to right order. Prime and Mathcad do this correctly when you use an explicit multiplication symbol.
So the problem is not any missing pair of parenthesis when using the inline division, but Primes/Mathcads (IMHO inconsistent) handling of the implicit multiplication. So I was looking for some reliable source covering a possible exceptional position of the implicit multiplication to be applied before any other divisions and multiplication - but to no avail. (So I consider the different handling of explicit and implicit multiplication to be a bug.)
The standard is not of much help here as it only succinctly says that you may omit the multiplication symbol "if no misunderstanding is possible". Given that misunderstanding is always possible. this is an unhelpful formulation 😉
Its interesting to see in your screenshot that Maple (symbolic in MC11) correctly deals with the implicit multiplication.
BTW, Wolfram Alpha once again, only adheres to its own rules and yields correctly 4 when you input "4 / 2 * 2", but it gives 1 with "4 : 2 * 2" 🙂