Power function on ℂ
#
We construct the power functions x ^ y
, where x
and y
are complex numbers.
The complex power function x ^ y
, given by x ^ y = exp(y log x)
(where log
is the
principal determination of the logarithm), unless x = 0
where one sets 0 ^ 0 = 1
and
0 ^ y = 0
for y ≠ 0
.
Equations
- x.cpow y = if x = 0 then if y = 0 then 1 else 0 else Complex.exp (Complex.log x * y)
Instances For
Equations
- Complex.instPow = { pow := Complex.cpow }
See Note [no_index around OfNat.ofNat]
See Note [no_index around OfNat.ofNat]
Alias of Complex.cpow_natCast
.
See Note [no_index around OfNat.ofNat]
Alias of Complex.cpow_intCast
.
See Note [no_index around OfNat.ofNat]
A version of Complex.cpow_int_mul
with RHS that matches Complex.cpow_mul
.
The assumptions on the arguments are needed
because the equality fails, e.g., for x = -I
, n = 2
, y = 1/2
.
A version of Complex.cpow_nat_mul
with RHS that matches Complex.cpow_mul
.
The assumptions on the arguments are needed
because the equality fails, e.g., for x = -I
, n = 2
, y = 1/2
.
See also Complex.pow_cpow_ofNat_inv
for a version that also works for x * I
, 0 ≤ x
.
Complex.inv_cpow_eq_ite
with the ite
on the other side.