It is fun seeing all the answers people put for this, but I want to question the people saying the answer is 1. Going with BODMAS (or PEMDAS) to attempt to solve this mess, you would do the 3 / 1/3 = 9. then 9+1 = 10, and finally 9 - 10 = -1
That said, the equation is a mess and intentionally written to get people giving different answers
However, when you apply the order of operations, itâs better to think of the acronym as BO[DM][AS], since the [DM] and [AS] pairs share the same precedence.
Therefore, when you encounter these, you solve them from left to right.
In the case of addition and subtraction. If you have 9 - 9 + 1 you could think of the subtraction as just adding a negative number instead.
This would give you 9 + (-9) + 1, which should then leads you to the correct answer of 1.
Looking at subtraction in this way also makes something known as âthe commutative property of additionâ more readily apparent.
I agree with what you say there, but the equation itself is flawed, as is stated in the video.
Going by the traditional sense of BODMAS, the answer is 1
By bringing in programming Logic, you can then get the answer -1
If you look at the equation as 9-3á1/3+1 and note that á and / mean the same thing, you then end up with 9-(3/1/3)+1, which in the end leads to an answer of 9.
The fun thing with math is that without following correct and clear notation, you can end up with the same equation giving multiple answers dependent on how it is interpreted by different people. It is why it is important to have a clear set of instructions, and why its fun to pick apart when the instructions are not clear
Pretty much every commonly used programing language gives the same level of precedence to multiplication/division and addition/subtraction, so they should always return 1 when it comes to that final step (provided you did that division by a fraction part correctly).
However, youâre absolutely correct that the middle section could cause you some serious headaches when it comes to programming the calculation.
Personally, Iâd always recommend using more sets of parentheses than you think you need, to make sure that everything gets executed in the correct order.
Without them, that central part would be calculated as (3 / 1) / 3 when you actually want 3 / (1 / 3).
Personally Iâd write the full equation as 9 - ( 3 / (1/3) ) + 1 to make things as obvious as necessary.
However, you good go full overkill and write ( 9 - ( 3 / ( 1 / 3 ) ) ) + 1 to make things painfully clear.
Math is definitely a funny thing and something that our brains are not really wired to do naturally.
It always reminds me of a quote, which (I think) was from Cedric Villani (Iâm also paraphrasing):
âEverybody finds math difficult, the difference with mathematicians is that we enjoy the challengeâ.