The argument of a complex number. #
We define arg : ℂ → ℝ
, returning a real number in the range (-π, π],
such that for x ≠ 0
, sin (arg x) = x.im / x.abs
and cos (arg x) = x.re / x.abs
,
while arg 0
defaults to 0
arg
returns values in the range (-π, π], such that for x ≠ 0
,
sin (arg x) = x.im / x.abs
and cos (arg x) = x.re / x.abs
,
arg 0
defaults to 0
Equations
- x.arg = if 0 ≤ x.re then Real.arcsin (x.im / Complex.abs x) else if 0 ≤ x.im then Real.arcsin ((-x).im / Complex.abs x) + Real.pi else Real.arcsin ((-x).im / Complex.abs x) - Real.pi
Instances For
@[simp]