Ah. So you gave addition a higher precedence than subtraction. That makes sense.
Comment on A - ( B x C ) + ( D x E ) = A - ( B x C ) - ( D x E ) if A > B + C + D + E
Arkouda@lemmy.ca 3 weeks agoI am not sure how I mixed that up but for some reason in my head I was thinking “Do Addition then (should read “and”) Subtraction in order from left to right”. This is why it is a shower thought and why I am brushing up on my math. haha
This is the back story of the silliness from another comment. I simply misremembered what to do and did addition before subtraction instead of left to right. I am still not sure exactly why because I literally just read a section on order of operations and my brain did the rest. I am usually not so bad at math, but my brain can be my worst enemy. haha
sxan@midwest.social 3 weeks ago
SmartmanApps@programming.dev 1 day ago
No, what you actually did was put it inside brackets, thus changing the number of terms. Doing addition first gives the exact same answer as doing subtraction first…
subtraction first 10-1+1=9+1=10
addition first 10+1-1=11-1=10
You did 10-(1+1), hence the wrong answer. It doesn’t matter which order you do it, though often students make mistakes with signs when they change the order, which is why we teach to do left to right.
Arkouda@lemmy.ca 1 day ago
The brackets are used to make the equation look cleaner, and the issue for declaring the statement true was doing Addition and Subtraction in the wrong order.
A - ( B x C ) + ( D x E ) = A - ( B x C ) - ( D x E )
Using your example:
10 - 1 + 1 = 10 doing the subtraction first. 10 - 1 + 1 = 8 doing the addition first.
When doing the other side of the equation:
10 - 1 - 1 = 8 regardless of order because it is all subtraction.
By doing it out of order and incorrectly I was able to make my statement true that as long as A was greater than the sum of B-E both sides would be equal.
SmartmanApps@programming.dev 1 day ago
No, they’re used to show deviations from the usual order of operations. If I want 2+3x4 to equal 20, then I have to write (2+3)x4.
No it isn’t. 10+1-1=11-1=10 is addition first. Note same answer, You did 10-(1+1) - you added brackets which changed the answer, thus a wrong answer
Not all of it. You’re forgetting the 10 is really +10. -10-1-1 would be all subtraction. +10-1-1 is addition and subtraction.
Yes it is! 😂 It is always the same regardless of order, as I have just shown you, again.
10-1+1=9+1=10
10+1-1=11-1=10
-1+1+10=0+10=10
1-1+10=0+10=10
1+10-1=11-1=10
-1+10+1=9+1=10
It’s NOT incorrect to do 10-1+1. It IS incorrect to do 10-(1+1), which is what you did
It was solely because you did it incorrectly. Order doesn’t change anything.
Arkouda@lemmy.ca 1 day ago
I am not going to argue with you about it. This was resolved almost a month ago.
Read the original equation again, plug some numbers into it, and try again. If that doesn’t help, read the rest of the thread. If you still don’t get it I cannot help you.