From: "trans (Thomas Sawyer)" Date: 2012-11-12T02:30:00+09:00 Subject: [ruby-core:49230] [ruby-trunk - Feature #7328] Move ** operator precedence under unary + and - Issue #7328 has been updated by trans (Thomas Sawyer). @alexeymuranov Okay, I see what you are saying. But I think the problem really is that mathematical notation tends to be a little too conventional and variant for a programming language, which needs to be more precise. In equations, the negative sign tends to either negate the whole, or is used to mean subtraction. It rarely occurs in the middle somewhere as a negation because it gets factored out to the whole. So it just rarely an issue. For programming however, it would kind of suck is `* -2` was an error b/c `*` is applied before `-`. And it could get rather complicated if Ruby tried to apply one order in one case and another order in another. ---------------------------------------- Feature #7328: Move ** operator precedence under unary + and - https://bugs.ruby-lang.org/issues/7328#change-32787 Author: boris_stitnicky (Boris Stitnicky) Status: Open Priority: Normal Assignee: Category: Target version: I would like to ask to consider decreasing ** operator precedence just below that of -/+ unary operators. I know that other languages (eg. Python) have ** operator bind tighter than negation, but seeing -1 ** 0.5 give the result -1 and having to type parenthesis (-1) ** 0.5... Even if it's not worth changing, I'd like to hear this rationalized. I've asked about rationalization of this on SO, and nobody seems to know why this precedence is the way it is. -- http://bugs.ruby-lang.org/