sub infix:<**>

Documentation for sub infix:<**> assembled from the following types:

class Complex

From Complex

(Complex) sub infix:<**>

Declared as

multi sub infix:<**>(Complex:D \aComplex:D \b --> Complex:D)
multi sub infix:<**>(Num(Real) \aComplex:D \b --> Complex:D)
multi sub infix:<**>(Complex:D \aNum(Real) \b --> Complex:D)

The exponentiation operator coerces the second argument to Complex and calculates the left-hand-side raised to the power of the right-hand side. Since 6.d, either argument can be equal to zero.

say i ** i# OUTPUT: «0.20787957635076193+0i␤» 
say 2 ** i# OUTPUT: «0.7692389013639721+0.6389612763136348i␤» 
say i ** 2# OUTPUT: «-1+1.2246467991473532e-16i␤» 
say 0 ** 1# OUTPUT: «0+0i␤»