Obelix@feddit.org to Technology@lemmy.worldEnglish · 28 days agoA fake Facebook event disguised as a math problem has been one of its top posts for 6 monthswww.engadget.comexternal-linkmessage-square109linkfedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkA fake Facebook event disguised as a math problem has been one of its top posts for 6 monthswww.engadget.comObelix@feddit.org to Technology@lemmy.worldEnglish · 28 days agomessage-square109linkfedilink
minus-square💡𝚂𝗆𝖺𝗋𝗍𝗆𝖺𝗇 𝙰𝗉𝗉𝗌📱@programming.devlinkfedilinkEnglisharrow-up1arrow-down1·14 hours ago Except it does matter No it doesn’t. You disobeying the rules and getting lots of wrong answers in your examples doesn’t change that. I left some examples for another post with multiplication and division Which you did wrong. I’ll give you some addition and subtraction to see order matter with those operations as well And I’ll show you it doesn’t matter when you do it correctly Subtraction first: 1 + (2 - 3) + 4 1 + (-1) + 4 = 4 Nope. Right answer for wrong reason - you only co-incidentally got the answer right. -3+1+2+4=-3+7=4 Right to left: 1 + (2 - (3 + 4)) 1 + (2 - 7) 1 + (-5) = -4 Nope. 4-3+2+1=1+2+1=3+1=4 Edit: You can argue that, for example, the addition first could be (1 + 2) + (-3 + 4) Or you could just do it correctly in the first place, always obeying Left Associativity and never adding Brackets in my opinion that’s another ambiguous case There aren’t ANY ambiguous cases. In every case it’s equal to 4. If you didn’t get 4, then you made a mistake and got a wrong answer.
No it doesn’t. You disobeying the rules and getting lots of wrong answers in your examples doesn’t change that.
Which you did wrong.
And I’ll show you it doesn’t matter when you do it correctly
Nope. Right answer for wrong reason - you only co-incidentally got the answer right. -3+1+2+4=-3+7=4
Nope. 4-3+2+1=1+2+1=3+1=4
Or you could just do it correctly in the first place, always obeying Left Associativity and never adding Brackets
There aren’t ANY ambiguous cases. In every case it’s equal to 4. If you didn’t get 4, then you made a mistake and got a wrong answer.