Open rh-KIMATA opened 6 years ago
Per https://en.wikipedia.org/wiki/Order_of_operations this is correct, though apparently there are some programming languages that do it the other way around.
https://tc39.github.io/ecma262/#sec-ecmascript-language-types-number-type uses the same notation as the HTML Standard.
I suppose we can make sure to clarify this as part of https://github.com/whatwg/infra/issues/87 with an example or some such, to explain that we mean it in the mathematical sense.
Thanks for your comment.
Per https://en.wikipedia.org/wiki/Order_of_operations this is correct, though apparently there are some programming languages that do it the other way around.
Sorry, I was misunderstand it as "-32 = 9" in mathematically.
I suppose we can make sure to clarify this as part of whatwg/infra#87 with an example or some such, to explain that we mean it in the mathematical sense.
I agree to your plan.
I don't think we need to repeat mathematical notation in Infra; this is so well-established that I'd rather leave it to places like Wikipedia or math textbooks.
I was thinking that it might be worth an example due to the potential for confusion with some programming languages and folks copy-and-pasting these numbers mostly into programming languages and not Mathematica.
I'm not too worried because no programming languages use superscripts to denote exponentiation (except Mathematica).
https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#rules-for-parsing-floating-point-number-values
But −21024 = 21024, because the power exponent is an even number.
"−21024" should be write "−(21024)" or "21024 * -1" for more accurately.