16.8. Exponentiation Operator

The operator ** is the expontiation operator. It is syntactically right-associative (it groups right-to-left), so a ** b ** c is the same as a ** (b ** c).

Exponentiation Expression
[50]ExponentiationExpression::=UnaryExpression [ '**' ExponentiationExpression ]  

Binary floating-point promotion is performed on the operands (see Section 8.2, “Binary Floating-Point Promotion”). The type of an exponentiation expression is the promoted type of its operands. The result of the expression is the result of the invocation of the method pow in the class StrictMath if the expression is FP-strict, or in the class Math otherwise. The left operand is passed as first argument to the method, the right operand as second argument. If the type of the expression is float, an additional narrowing primitive conversion to float is applied to the result of the invocation.