Comment on a very emphatic answer

<- View Parent
SmartmanApps@programming.dev ⁨4⁩ ⁨weeks⁩ ago

Multiplication comes before division in some forms, like PEMDAS. In the example I use, this changes the answer

If you have both multiplication and division then you do them left to right. PEMDAS doesn’t mean multiplication first, nor does BEDMAS mean division first. It’s PE(MD)(AS) and BE(DM)(AS) where the bracketed parts are done left to right.

you should specify what it is operating on

Left associativity means it always operates on the following term. i.e. terms are associated with the sign on their left.

The minus sign only applies to the middle term, by convention

By the rule of left associativity.

But if you use one of these acronyms, you end with this expression evaluating to -2

No it doesn’t. How on Earth did you manage to get -2?

all these acronyms end up being useless waste of time

No they’re not, but I don’t know yet where you’re going wrong with them without seeing your working out.

source
Sort:hotnewtop