Skip to content
instance method

Complex#**

(::Numeric) -> ::Complex
self ** exponent → complex

Returns self raised to the power exponent:

Example
Complex.rect(0, 1) ** 2            # => (-1+0i)
Complex.rect(-8) ** Rational(1, 3) # => (1.0000000000000002+1.7320508075688772i)
See also #* #+ .rectangular #- also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0