PHP Version : PHP 7.3.3-1+0~20190307202245.32+stretch~1.gbp32ebb2
(Php versions 7.1 and 7.2 I tested it, and behavior is the same.)
Symfony Version : 4.2
Twig Version : symfony/twig-bundle": "4.2.3
Lsb Release : Debian GNU/Linux 9.8 (stretch)
in raw php code (as expected):
-2 ** 2 = 4

in twig (something is wrong in here);
{{ -2 * 2 }}
{{ -2 * 3 }}
...

I think this might be related to some precedence issue in the way this is parsed. It may be parsed as - (2 ** 2) here instead of (-2) ** 2 (and so using a variable to store the -2 or using braces may not be affected)
btw, in PHP, if you remove the usage of a variable but inline the number (making it equivalent to the Twig code), you get the same behavior than the one you report in Twig.
I get it, in parenthesis it didn't work but defining a negative number variable works.
Thank you @stof , have a nice day.
This way works!


yeah, parenthesis may not work, because Twig would parse it as expected, but compile it to PHP without braces, and so be affected at the PHP level.
Most helpful comment
btw, in PHP, if you remove the usage of a variable but inline the number (making it equivalent to the Twig code), you get the same behavior than the one you report in Twig.