I understand how to evaluate an expression via PEMDAS. But I came up with something interesting. As per PEMDAS, multiplication and division have the same precedence and should thus be evaluated from left to right. And if I violate this rule by performing multiplication before division, it can cause different results. For example if I artificially boost the precedence of multiplication as shown below the calculated value changes from 9 to 1:
6 / 2 * 3 = 9
6 / (2 * 3) = 1
So giving multiplication a higher precedence can cause a problem. However, if I instead artificially boost the precedence of division as shown below the calculated value remains the same:
2 * 3 / 6 / 2 /3 * 2 = 1
2 * (3 / 6 /2 / 3) * 2 = 1
Can anyone think of a scenario, if we always perform division with a higher precedence than multiplication (which seems to violate PEMDAS), where we can get a result that does not match PEMDAS?