std/math/cmplx
Index
fn Sin(x: cmplx128): cmplx128
fn Sinh(x: cmplx128): cmplx128
fn Cos(x: cmplx128): cmplx128
fn Cosh(x: cmplx128): cmplx128
fn Tan(x: cmplx128): cmplx128
fn Tanh(x: cmplx128): cmplx128
fn Cot(x: cmplx128): cmplx128
fn Conj(x: cmplx128): cmplx128
fn IsInf(x: cmplx128): bool
fn IsNaN(x: cmplx128): bool
fn NaN(): cmplx128
fn Inf(sign: int): cmplx128
fn Log(x: cmplx128): cmplx128
fn Log10(x: cmplx128): cmplx128
fn Abs(x: cmplx128): f64
fn Rect(r: f64, theta: f64): cmplx128
fn Pow(x: cmplx128, y: cmplx128): cmplx128
fn Exp(x: cmplx128): cmplx128
fn Sqrt(x: cmplx128): cmplx128
fn Polar(x: cmplx128): (r: f64, theta: f64)
fn Phase(x: cmplx128): f64
fn Asin(x: cmplx128): cmplx128
fn Asinh(x: cmplx128): cmplx128
fn Acos(x: cmplx128): cmplx128
fn Acosh(x: cmplx128): cmplx128
fn Atan(x: cmplx128): cmplx128
fn Atanh(x: cmplx128): cmplx128
Sin
fn Sin(x: cmplx128): cmplx128
Returns the sine of complex number.
Sinh
fn Sinh(x: cmplx128): cmplx128
Returns the hyperbolic sine of complex number.
Cos
fn Cos(x: cmplx128): cmplx128
Returns the cosine of complex number.
Cosh
fn Cosh(x: cmplx128): cmplx128
Returns the hyperbolic cosine of complex number.
Tan
fn Tan(x: cmplx128): cmplx128
Returns the tangent of complex number.
Tanh
fn Tanh(x: cmplx128): cmplx128
Returns the hyperbolic tangent of complex number.
Cot
fn Cot(x: cmplx128): cmplx128
Returns the cotangent of complex number.
Conj
fn Conj(x: cmplx128): cmplx128
Returns conjugate of complex number.
IsInf
fn IsInf(x: cmplx128): bool
Reports whether either real or imag is an infinity.
IsNaN
fn IsNaN(x: cmplx128): bool
Reports whether either real or imag is NaN and neither is an infinity.
NaN
fn NaN(): cmplx128
Returns NaN complex number.
Inf
fn Inf(sign: int): cmplx128
Returns Inf complex number. Uses positive infinity if sign >= 0, negative infinity if !sign < 0.
Log
fn Log(x: cmplx128): cmplx128
Returns the natural logarithm of complex number.
Log10
fn Log10(x: cmplx128): cmplx128
Returns the decimal logarithm of complex number.
Abs
fn Abs(x: cmplx128): f64
Returns the absolute value (also called the modulus) of x.
Rect
fn Rect(r: f64, theta: f64): cmplx128
Returns the complex number with polar coordinates r, θ.
Pow
fn Pow(x: cmplx128, y: cmplx128): cmplx128
Returns x**y, the base-x exponential of y. For generalized compatibility with math::pow:
Pow(0, ±0) returns 1+0i
Pow(0, c) for real(c)<0 returns Inf+0i if imag(c) is zero, otherwise Inf+Inf i.
Exp
fn Exp(x: cmplx128): cmplx128
Returns e**x, the base-e exponential of x.
Sqrt
fn Sqrt(x: cmplx128): cmplx128
Returns the square root of complex number. The result r is chosen so that real(r) ≥ 0 and imag(r) has the same sign as imag(x).
Polar
fn Polar(x: cmplx128): (r: f64, theta: f64)
Polar returns the absolute value r and phase θ of x, such that x = r * e**θi. The phase is in the range [-PI, PI].
Phase
fn Phase(x: cmplx128): f64
Phase returns the phase (also called the argument) of x. The returned value is in the range [-Pi, Pi].
Asin
fn Asin(x: cmplx128): cmplx128
Returns the inverse sine of complex number.
Asinh
fn Asinh(x: cmplx128): cmplx128
Returns the inverse hyperbolic sine of complex number.
Acos
fn Acos(x: cmplx128): cmplx128
Returns the inverse cosine of complex number.
Acosh
fn Acosh(x: cmplx128): cmplx128
Returns the inverse hyperbolic cosine of complex number.
Atan
fn Atan(x: cmplx128): cmplx128
Returns the inverse tangent of complex number.
Atanh
fn Atanh(x: cmplx128): cmplx128
Returns the inverse hyperbolic tangent of complex number.