![](https://programming.dev/pictrs/image/9fe0461d-89b7-4b64-a37b-91324e2ebad5.jpeg)
![](https://lemmy.ml/pictrs/image/c0ed0a36-2496-4b4d-ac77-7d2fd7f2b5b7.png)
-5**2 is apparently -25 because of the order of operations)
Which is correct
-5**2 is apparently -25 because of the order of operations)
Which is correct
As a Maths teacher, almost daily 😂
You can if you wrote everything as just addition and subtraction, but then we made some shorthand notations for that, such as 2x3=2+2+2, and so now you have to do multiplication before addition otherwise you get a wrong answer, and if you wrote all multiplications before all additions there’d still be no problem, but as someone else pointed out, there are cases where it’s easier to have a different order, and so voila! Order of operations rules.
Actually multiplication and division are shorthand notations for addition and subtraction - e.g. 2x3=2+2+2 - so everything boils down to addition and subtraction.
Yeah, base ten really screws around with programming. You specifically have to use a decimal type if you really want to use it (for like finance or something), but it’s much slower.
Yeah, they’re doing an upgrade right now. Yes, it’s the Maths explanation - -25 is the correct answer.