Elektrine lite

← Feed

@SmartmanApps@dotnet.social

2023-08-28 06:28 UTC

5/6 If you did want to do 4 and 1 first, then you would have to do it as 1-4, and THEN you would still get the correct answer. It's important to keep the minus sign with the 4. i.e. left associativity. So the easy way to do that is to work left-to-right, but within order of operations rules!

Replies (1)

  • @SmartmanApps@dotnet.social 2023-08-28 06:28

    6/6 Cos the other mistake I see is people insisting left-to-right is a rule, and ignore order of operations! No, order of operations is the rule, and left to right is a rule WITHIN Division, and other operations - like add and subtract, and multiply - can be done in any order, provided you maintain left associativity for all signs. i.e. within add and subtract +5-4+1 can be done as +1-4+5, or even +5+1-4, but definitely never +1+4-5 or +5-(4+1). More on 1917 next week...

    Open ##5026414