cmplx

Imports

Imports #

"math"
"math"
"math"
"math"
"math"
"math"
"math"
"math"
"math"
"math"
"math"
"math/bits"
"math"

Functions

Abs function #

Abs returns the absolute value (also called the modulus) of x.

func Abs(x complex128) float64

Acos function #

Acos returns the inverse cosine of x.

func Acos(x complex128) complex128

Acosh function #

Acosh returns the inverse hyperbolic cosine of x.

func Acosh(x complex128) complex128

Asin function #

Asin returns the inverse sine of x.

func Asin(x complex128) complex128

Asinh function #

Asinh returns the inverse hyperbolic sine of x.

func Asinh(x complex128) complex128

Atan function #

Atan returns the inverse tangent of x.

func Atan(x complex128) complex128

Atanh function #

Atanh returns the inverse hyperbolic tangent of x.

func Atanh(x complex128) complex128

Conj function #

Conj returns the complex conjugate of x.

func Conj(x complex128) complex128

Cos function #

Cos returns the cosine of x.

func Cos(x complex128) complex128

Cosh function #

Cosh returns the hyperbolic cosine of x.

func Cosh(x complex128) complex128

Cot function #

Cot returns the cotangent of x.

func Cot(x complex128) complex128

Exp function #

Exp returns e**x, the base-e exponential of x.

func Exp(x complex128) complex128

Inf function #

Inf returns a complex infinity, complex(+Inf, +Inf).

func Inf() complex128

IsInf function #

IsInf reports whether either real(x) or imag(x) is an infinity.

func IsInf(x complex128) bool

IsNaN function #

IsNaN reports whether either real(x) or imag(x) is NaN and neither is an infinity.

func IsNaN(x complex128) bool

Log function #

Log returns the natural logarithm of x.

func Log(x complex128) complex128

Log10 function #

Log10 returns the decimal logarithm of x.

func Log10(x complex128) complex128

NaN function #

NaN returns a complex “not-a-number” value.

func NaN() complex128

Phase function #

Phase returns the phase (also called the argument) of x. The returned value is in the range [-Pi, Pi].

func Phase(x complex128) float64

Polar function #

Polar returns the absolute value r and phase θ of x, such that x = r * e**θi. The phase is in the range [-Pi, Pi].

func Polar(x complex128) (r float64, θ float64)

Pow function #

Pow 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.

func Pow(x complex128, y complex128) complex128

Rect function #

Rect returns the complex number x with polar coordinates r, θ.

func Rect(r float64, θ float64) complex128

Sin function #

Sin returns the sine of x.

func Sin(x complex128) complex128

Sinh function #

Sinh returns the hyperbolic sine of x.

func Sinh(x complex128) complex128

Sqrt function #

Sqrt returns the square root of x. The result r is chosen so that real(r) ≥ 0 and imag(r) has the same sign as imag(x).

func Sqrt(x complex128) complex128

Tan function #

Tan returns the tangent of x.

func Tan(x complex128) complex128

Tanh function #

Tanh returns the hyperbolic tangent of x.

func Tanh(x complex128) complex128

reducePi function #

reducePi reduces the input argument x to the range (-Pi/2, Pi/2]. x must be greater than or equal to 0. For small arguments it uses Cody-Waite reduction in 3 float64 parts based on: "Elementary Function Evaluation: Algorithms and Implementation" Jean-Michel Muller, 1997. For very large arguments it uses Payne-Hanek range reduction based on: "ARGUMENT REDUCTION FOR HUGE ARGUMENTS: Good to the Last Bit" K. C. Ng et al, March 24, 1992.

func reducePi(x float64) float64

sinhcosh function #

calculate sinh and cosh.

func sinhcosh(x float64) (sh float64, ch float64)

tanSeries function #

Taylor series expansion for cosh(2y) - cos(2x)

func tanSeries(z complex128) float64

Generated with Arrow