4 ms·
I recall reading that this was easier to implement in memory constrained machines running Excel back then, and now can't be changed for compatibility. It has b
by FabHK 2y ago
I recall reading that this was easier to implement in memory constrained machines running Excel back then, and now can't be changed for compatibility.
It has bitten me when I computed the pdf of a standard normal in Excel, invoking exp(-A1^2), say.
Someone made a website (in 2003, it's a bit out of date) tracking this issue:
http://www.macnauchtan.com/pub/precedence.html http://www.macnauchtan.com/pub/precedence.html
- eviks 2y agoBut of course it can be changed, you can make it configurable even if you decide the default should continue be this silly mistake "for compatibility"
- verbify 2y agoIt is configurable - with brackets.
- eviks 2y agoYou confuse configuration with data entry
- tsimionescu 2y agoThere's no "mistake", the current way makes much more sense in programming notation. It's far better that -3^2 is consistent with -3+2. The caret notation for exponentiation is anyway completely different, and works very differently in terms of precedence from using super scripts in math.
- eviks 2y agoThat's a mistake in every statement: Excel isn't programming, so programming notation isn't even relevant There is also no difference in the caret notation vs superscript, its upward pointing form literally meant to signify SUPERscript It's far better that 0-3^2 -3^2 are consistent, consistency between exponent and addition makes little sense since by universal convention they have different priorities, so you'd not expect any "consistency" there Also your -3+2 example is meaningless since its output is the same as -((+3)+2) so there is no inconsistency with -9 And no, ^ doesn't universally work differently vs superscript, just in some poorly designed apps
- Biganon 2y agoI don't have a horse in this seemingly extremely important race, but Excel absolutely is programming
- tsimionescu 2y agoExcel formulae are absolutely a form of computation, or programming. While the caret is meant to symbolize superscript, it is nevertheless a completely different notation for exponentiation. I don't see why 0-3^2 and -3^2 need to be consistent necessarily. Sign change and subtraction are different operations, so they can have different relationships with other operators. If + worked like you want ^ to work, then -3+2 would equal -5, instead of the more common -1. ^ does work differently from superscript in all apps. The way you write "three to the power two plus two" is completely different.
- eviks 2y agoAbacus is a form of computation, doesn't make it programming. > While the caret is meant to symbolize superscript, it is nevertheless a completely different notation for exponentiation. Wait, do you believe slash / to be a completely different notation with different rules for division? Also, it's not completely different, I've already explained that its form points to the same participle - RAISing base to the power, exactly the same as superscript. It's just that input/typesetting on computers is very primitive, so you can't really use superscript conveniently, otherwise it's semantically the same, so having different rules for the same meaning makes no sense > I don't see why 0-3^2 and -3^2 need to be consistent necessarily ok, if you fail to see this basic similarity but somehow think -3+2 is identical, don't have anything else to say here > If + worked like you want ^ to work, then -3+2 would equal -5, instead of the more common -1. Why would I ever want addition to work the same as exponeiation??? That's your weird wish for them to behave the same, I respect the math precedence of operators. > ^ doesw differently from superscript in all apps that's not true, https://www.wolframalpha.com/input?i=-3%5E2 https://www.wolframalpha.com/input?i=-3%5E2 Many calculators / calculator apps also behave the same
- tsimionescu 2y ago