Rainmeter complains about extra operations in the formula (syntax error) because what the Formula evaluator gets is: 5+-1+-3
what it should get is: 5+(-1)+(-3)
If I enclose all the variables and measure values in brackets, everything works fine, but in my opinion, this should not be necessary.
I have to disagree, actually. Variables work by direct string substitution: Rainmeter replaces the #Variable# name with the literal string value, then interprets the line as if the variable was never there. We can't treat variables like algebraic symbols because they aren't guaranteed to resolve to a number. Only another measure will always give you a number value, and you can reference measures directly, without dynamic variables:
If variables in Calc formulas were treated as a special case, we would lose the flexibility that direct substitution gives us. For example, you couldn't use them to stitch different parts of a formula together unless each part could be resolved independently.