To further isolate the problem, currently,
(-1**2) is incorrectly equivalent to
((-1)**2) and yields
1, but should actually be equivalent to
(-(1**2)) and yield
-1, based on how math works.
Found out why this happens as well, it's hilarious. Apparently, the poor makers of C++ (who are otherwise worthy of praise for creating one of the fastest and efficient programming languages) thought of rewriting BASIC mathematics and let the
unary + and - have higher precedence than all of the remaining operations, including multiplication, division, addition and subtraction.
Even error prone Javascript thought of giving an error when writing
console.log(-1**2); cause ... it's "ambiguous", despite the vast majority of the other languages (and Google too) correctly setting multiplication to have higher precedence than both the "unary" nonsense (is that even an operation?) or the subtraction. Here's a
little discussion about this from people who actually went to school - needless to say, while everybody accepts this behavior (cause they have no other choice, of course), nobody really gets it WHY.
So, let's call this an accepted / intentional - but clearly incorrect - C++ behavior. It has nothing to do with Rainmeter, but because Rainmeter was programmed in C++, it inherited both its strengths and its flaws, intentional or not. The way things are going, looks like one day folks would even argue whether 1+1 equals 2 or 3...
