If you have a bunch of unparenthesized addition and subtraction, left to right doesn’t matter.
Right, because 1-2-3=3-2-1.
Comment on I dunno
SpaceCadet@feddit.nl 3 weeks agoIf you have a bunch of unparenthesized addition and subtraction, left to right is correct
If you have a bunch of unparenthesized addition and subtraction, left to right doesn’t matter.
1 + 2 - 3 = 1 - 3 + 2 = -3 + 2 + 1
If you have a bunch of unparenthesized addition and subtraction, left to right doesn’t matter.
Right, because 1-2-3=3-2-1.
Right, because 1-2-3=3-2-1
No, 1-2-3=-3-2+1. You changed the signs on the 1 and the 3.
You flipped the sign on the 3 and 1.
I did not flip any signs, merely reversed the order in which the operations are written out. If you read the right side from right to left, it has the same meaning as the left side from left to right.
Hell, the convention that the sign is on the left is also just a convention, as is the idea that the smallest digit is on the right (which should be a familiar issue to programmers, if you look up big endian vs little endian)
I did not flip any signs
Yes you did! 😂
merely reversed the order in which the operations are written out
No, merely reversing the order gives -3-2+1 - you changed the signs on the 1 and 3.
If you read the right side from right to left, it
Starts with -3, which you changed to +3
it has the same meaning as the left side from left to right
when you don’t change any of the signs it does 😂
Hell, the convention that the sign is on the left is also just a convention
Nope, it’s a rule of Maths, Left Associativity.
If that’s your idea of reversing the order, then you’re not talking about the same thing as SpaceCadet@feddit.nl. They’re talking about the order of operations and the associativity property. You’re talking about the order of the symbols.
MotoAsh@piefed.social 3 weeks ago
True, but as with many things, something has to be the rule for processing it. For many teachers as I’ve heard, order of appearance is ‘the rule’ when commutative properties apply. … at least until algebra demands simplification, but that’s a different topic.
SmartmanApps@programming.dev 5 days ago
That’s because students often make mistakes with signs when they do it in a different order, so we tell them to stick to left to right
SpaceCadet@feddit.nl 3 weeks ago
Well the rule is: any order goes. Summation is commutative.
MotoAsh@piefed.social 3 weeks ago
No, you completely misunderstood my point. My point is not to describe all valid interpretations, but the one most slow kids will be taught.
Quatlicopatlix@feddit.org 3 weeks ago
Yes thank you! If you have a sum it is really great to order it in a way that makes it better to ad in your head and i think that lots of people do that without thinking about it. X=2+3+1+6+2+4+7+5 X=2+3+5+4+6+7+1+2 X=5+5 + 10 +7+1+2 X=10 + 10 + 7+3 X=10 + 10 + 10