I think I learned powers take priority over the “-”
Yes, Exponents is the 2nd-highest precedence (after Brackets) - BEDMAS.
Comment on ))<>((
ByGourou@sh.itjust.works 7 months agoIsn’t the “-” order of operations the same as a multiply ? I think I learned powers take priority over the “-” so your calculator would be right.
But either way if it can cause confusion you should use parentheses.
I think I learned powers take priority over the “-”
Yes, Exponents is the 2nd-highest precedence (after Brackets) - BEDMAS.
TonyTonyChopper@mander.xyz 7 months ago
Every calculator I’ve used has separate negative and subtraction keys for this purpose. There is no order of operations to follow, it’s just a squaring a number
ByGourou@sh.itjust.works 7 months ago
I learned negative as being a separate operation where we need to apply the order of operations. I think it was something like : -2 is a diminutive for -1x2 so it uses the order of operations of a multiplication.
My calculator is the official one used in schools in France (ti-83 premium ce) and it says -2^2 = 4 with the negative key. I don’t think it would make a mistake in such a simple concept.
But whatever these concepts can change depending on the field, country, level of education. What I mean is : it’s unclear, so use parentheses. So (-2)^2 or -(2^2) are the correct ways to write it.
SmartmanApps@programming.dev 7 months ago
Correct. Things that are usually left out of Maths expressions are plus signs, ones as multipliers/indices, and un-needed brackets. e.g. I could more fully write this as -1(4)², but that just simplifies to -4²
SmartmanApps@programming.dev 7 months ago
The number being squared is 4, unless you put (-4)², otherwise it’s 4² with a minus sign.