e2 docs complex - wiremod/wire GitHub Wiki

Jump to table of contents

Complex

ComplexNumber = comp()

Returns complex zero (2 ops)

ComplexNumber = comp(Number A)

Converts a real number to complex (returns complex number with real part N and imaginary part 0) (2 ops)

ComplexNumber = comp(Number A, Number B)

Returns a + b*i (2 ops)

ComplexNumber = i()

Returns the imaginary unit i (2 ops)

ComplexNumber = i(Number B)

Returns N*i (2 ops)

Number = abs(ComplexNumber Z)

Returns the absolute value of C (2 ops)

Number = arg(ComplexNumber Z)

Returns the argument of C (2 ops)

ComplexNumber = conj(ComplexNumber Z)

Returns the conjugate of C (2 ops)

Number = real(ComplexNumber Z)

Returns the real part of C (2 ops)

Number = imag(ComplexNumber Z)

Returns the imaginary part of C (2 ops)

ComplexNumber = exp(ComplexNumber Z)

Raises Euler's constant e to the power of C (2 ops)

ComplexNumber = log(ComplexNumber Z)

Calculates the natural logarithm of C (2 ops)

ComplexNumber = log(ComplexNumber Base, ComplexNumber Z)

Calculates the logarithm of C2 to a complex base C (2 ops)

ComplexNumber = log(Number Base, ComplexNumber Z)

Calculates the logarithm of C to a real base N (2 ops)

ComplexNumber = log2(ComplexNumber Z)

Calculates the logarithm of C to base 2 (2 ops)

ComplexNumber = log10(ComplexNumber Z)

Calculates the logarithm of C to base 10 (2 ops)

ComplexNumber = sqrt(ComplexNumber Z)

Calculates the square root of C (2 ops)

ComplexNumber = csqrt(Number N)

Calculates the complex square root of the real number N (2 ops)

ComplexNumber = sin(ComplexNumber Z)

Calculates the sine of C (3 ops)

ComplexNumber = cos(ComplexNumber Z)

Calculates the cosine of C (3 ops)

ComplexNumber = sinh(ComplexNumber Z)

Calculates the hyperbolic sine of C (3 ops)

ComplexNumber = cosh(ComplexNumber Z)

Calculates the hyperbolic cosine of C (3 ops)

ComplexNumber = tan(ComplexNumber Z)

Calculates the tangent of C (3 ops)

ComplexNumber = cot(ComplexNumber Z)

Calculates the cotangent of C (3 ops)

ComplexNumber = asin(ComplexNumber Z)

Calculates the inverse sine of C (5 ops)

ComplexNumber = acos(ComplexNumber Z)

Calculates the inverse cosine of C (5 ops)

ComplexNumber = atan(ComplexNumber Z)

Calculates the inverse tangent of C (5 ops)

Number = atan2(ComplexNumber Z)

Calculates the principle value of C (2 ops)

ComplexNumber = tanh(ComplexNumber Z)

Calculates the hyperbolic tangent of C (4 ops)

ComplexNumber = coth(ComplexNumber Z)

Calculates the hyperbolic cotangent of C (4 ops)

ComplexNumber = sec(ComplexNumber Z)

Calculates the secant of C (3 ops)

ComplexNumber = csc(ComplexNumber Z)

Calculates the cosecant of C (3 ops)

ComplexNumber = sech(ComplexNumber Z)

Calculates the hyperbolic secant of C (3 ops)

ComplexNumber = csch(ComplexNumber Z)

Calculates the hyperbolic cosecant of C (3 ops)

String = toString(ComplexNumber Z)

Formats C as a string (15 ops)

String = ComplexNumber:toString()

The same as toString(C) (15 ops)