You flipped the sign on the 3 and 1.
Comment on I dunno
kuberoot@discuss.tchncs.de 3 weeks agoIf you have a bunch of unparenthesized addition and subtraction, left to right doesn’t matter.
Right, because 1-2-3=3-2-1.
howrar@lemmy.ca 2 weeks ago
kuberoot@discuss.tchncs.de 2 weeks ago
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)
SmartmanApps@programming.dev 5 days ago
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.
howrar@lemmy.ca 2 weeks ago
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.
SmartmanApps@programming.dev 5 days ago
No, 1-2-3=-3-2+1. You changed the signs on the 1 and the 3.