math.complex #

fn complex #

fn complex(re f64, im f64) Complex

struct Complex #

struct Complex {
pub:
	re f64
	im f64
}

fn (Complex) str #

fn (c Complex) str() string

To String method

fn (Complex) abs #

fn (c Complex) abs() f64

Complex Modulus value mod() and abs() return the same

fn (Complex) mod #

fn (c Complex) mod() f64

fn (Complex) angle #

fn (c Complex) angle() f64

Complex Angle

fn (Complex) + #

fn (c1 Complex) + (c2 Complex) Complex

Complex Addition c1 + c2

fn (Complex) - #

fn (c1 Complex) - (c2 Complex) Complex

Complex Substraction c1 - c2

fn (Complex) * #

fn (c1 Complex) * (c2 Complex) Complex

Complex Multiplication c1 * c2

fn (Complex) / #

fn (c1 Complex) / (c2 Complex) Complex

Complex Division c1 / c2

fn (Complex) add #

fn (c1 Complex) add(c2 Complex) Complex

Complex Addition c1.add(c2)

fn (Complex) subtract #

fn (c1 Complex) subtract(c2 Complex) Complex

Complex Subtraction c1.subtract(c2)

fn (Complex) multiply #

fn (c1 Complex) multiply(c2 Complex) Complex

Complex Multiplication c1.multiply(c2)

fn (Complex) divide #

fn (c1 Complex) divide(c2 Complex) Complex

Complex Division c1.divide(c2)

fn (Complex) conjugate #

fn (c Complex) conjugate() Complex

Complex Conjugate

fn (Complex) addinv #

fn (c Complex) addinv() Complex

Complex Additive Inverse Based on http://tutorial.math.lamar.edu/Extras/ComplexPrimer/Arithmetic.aspx

fn (Complex) mulinv #

fn (c Complex) mulinv() Complex

Complex Multiplicative Inverse Based on http://tutorial.math.lamar.edu/Extras/ComplexPrimer/Arithmetic.aspx

fn (Complex) pow #

fn (c Complex) pow(n f64) Complex

Complex Power Based on https://www.khanacademy.org/math/precalculus/imaginary-and-complex-numbers/multiplying-and-dividing-complex-numbers-in-polar-form/a/complex-number-polar-form-review

fn (Complex) root #

fn (c Complex) root(n f64) Complex

Complex nth root

fn (Complex) exp #

fn (c Complex) exp() Complex

Complex Exponential Using Euler's Identity Based on https://www.math.wisc.edu/~angenent/Free-Lecture-Notes/freecomplexnumbers.pdf

fn (Complex) ln #

fn (c Complex) ln() Complex

Complex Natural Logarithm Based on http://www.chemistrylearning.com/logarithm-of-complex-number/

fn (Complex) log #

fn (c Complex) log(base Complex) Complex

Complex Log Base Complex Based on http://www.milefoot.com/math/complex/summaryops.htm

fn (Complex) arg #

fn (c Complex) arg() f64

Complex Argument Based on http://mathworld.wolfram.com/ComplexArgument.html

fn (Complex) cpow #

fn (c Complex) cpow(p Complex) Complex

Complex raised to Complex Power Based on http://mathworld.wolfram.com/ComplexExponentiation.html

fn (Complex) sin #

fn (c Complex) sin() Complex

Complex Sin Based on http://www.milefoot.com/math/complex/functionsofi.htm

fn (Complex) cos #

fn (c Complex) cos() Complex

Complex Cosine Based on http://www.milefoot.com/math/complex/functionsofi.htm

fn (Complex) tan #

fn (c Complex) tan() Complex

Complex Tangent Based on http://www.milefoot.com/math/complex/functionsofi.htm

fn (Complex) cot #

fn (c Complex) cot() Complex

Complex Cotangent Based on http://www.suitcaseofdreams.net/Trigonometric_Functions.htm

fn (Complex) sec #

fn (c Complex) sec() Complex

Complex Secant Based on http://www.suitcaseofdreams.net/Trigonometric_Functions.htm

fn (Complex) csc #

fn (c Complex) csc() Complex

Complex Cosecant Based on http://www.suitcaseofdreams.net/Trigonometric_Functions.htm

fn (Complex) asin #

fn (c Complex) asin() Complex

Complex Arc Sin / Sin Inverse Based on http://www.milefoot.com/math/complex/summaryops.htm

fn (Complex) acos #

fn (c Complex) acos() Complex

Complex Arc Consine / Consine Inverse Based on http://www.milefoot.com/math/complex/summaryops.htm

fn (Complex) atan #

fn (c Complex) atan() Complex

Complex Arc Tangent / Tangent Inverse Based on http://www.milefoot.com/math/complex/summaryops.htm

fn (Complex) acot #

fn (c Complex) acot() Complex

Complex Arc Cotangent / Cotangent Inverse Based on http://www.suitcaseofdreams.net/Inverse_Functions.htm

fn (Complex) asec #

fn (c Complex) asec() Complex

Complex Arc Secant / Secant Inverse Based on http://www.suitcaseofdreams.net/Inverse_Functions.htm

fn (Complex) acsc #

fn (c Complex) acsc() Complex

Complex Arc Cosecant / Cosecant Inverse Based on http://www.suitcaseofdreams.net/Inverse_Functions.htm

fn (Complex) sinh #

fn (c Complex) sinh() Complex

Complex Hyperbolic Sin Based on http://www.milefoot.com/math/complex/functionsofi.htm

fn (Complex) cosh #

fn (c Complex) cosh() Complex

Complex Hyperbolic Cosine Based on http://www.milefoot.com/math/complex/functionsofi.htm

fn (Complex) tanh #

fn (c Complex) tanh() Complex

Complex Hyperbolic Tangent Based on http://www.milefoot.com/math/complex/functionsofi.htm

fn (Complex) coth #

fn (c Complex) coth() Complex

Complex Hyperbolic Cotangent Based on http://www.suitcaseofdreams.net/Hyperbolic_Functions.htm

fn (Complex) sech #

fn (c Complex) sech() Complex

Complex Hyperbolic Secant Based on http://www.suitcaseofdreams.net/Hyperbolic_Functions.htm

fn (Complex) csch #

fn (c Complex) csch() Complex

Complex Hyperbolic Cosecant Based on http://www.suitcaseofdreams.net/Hyperbolic_Functions.htm

fn (Complex) asinh #

fn (c Complex) asinh() Complex

Complex Hyperbolic Arc Sin / Sin Inverse Based on http://www.suitcaseofdreams.net/Inverse__Hyperbolic_Functions.htm

fn (Complex) acosh #

fn (c Complex) acosh() Complex

Complex Hyperbolic Arc Consine / Consine Inverse Based on http://www.suitcaseofdreams.net/Inverse__Hyperbolic_Functions.htm

fn (Complex) atanh #

fn (c Complex) atanh() Complex

Complex Hyperbolic Arc Tangent / Tangent Inverse Based on http://www.suitcaseofdreams.net/Inverse__Hyperbolic_Functions.htm

fn (Complex) acoth #

fn (c Complex) acoth() Complex

Complex Hyperbolic Arc Cotangent / Cotangent Inverse Based on http://www.suitcaseofdreams.net/Inverse__Hyperbolic_Functions.htm

fn (Complex) acsch #

fn (c Complex) acsch() Complex

Complex Hyperbolic Arc Cosecant / Cosecant Inverse Based on http://www.suitcaseofdreams.net/Inverse__Hyperbolic_Functions.htm

fn (Complex) equals #

fn (c1 Complex) equals(c2 Complex) bool

Complex Equals