SYNOPSIS
|
DESCRIPTION
![]()
|
INITIALIZATION
The M_ComplexGet() routine returns a M_Complex structure describing a complex number with real part r and imaginary part i. M_ComplexI() returns the complex number for i. M_ComplexMinusI() returns the complex number for -i. The M_ReadComplex() function reads a complex number from an AG_DataSource(3) and returns it. M_CopyComplex() returns the number in z. M_WriteComplex() writes a complex number to a data source. |
BASIC OPERATIONS
ARITHMETIC OPERATIONS
The M_ComplexAdd() routine returns the sum of complex numbers a and b. M_ComplexSub() returns the difference. M_ComplexMult() computes the product of complex numbers a and b. M_ComplexDiv() divides a by b and returns the result. The M_ComplexAbs() function computes the complex absolute value (i.e., sqrt(r^2 + i^2)). If the magnitude of either real or imaginary parts differs with zero up to 50% of machine precision, both parts are rescaled prior to squaring. M_ComplexSqrt() computes the complex square root of z. M_ComplexLog() computes the complex natural logarithm of z. M_ComplexExp() computes the exponential of z. M_ComplexPow() returns a raised to the complex power z. |
TRIGONOMETRIC AND HYPERBOLIC OPERATIONS
The M_ComplexSin() function returns the complex sine of z. M_ComplexCos() returns the complex cosine, M_ComplexTan() returns the complex tangent and M_ComplexCot() returns the complex cotangent. M_ComplexAsin(), M_ComplexAcos() and M_ComplexAtan() compute the complex arc sine, arc cosine and arc tangent of z, respectively. M_ComplexSinh(), M_ComplexAsinh(), M_ComplexCosh(), M_ComplexAcosh(), M_ComplexTanh(), M_ComplexAtanh() compute the complex hyperbolic sine, arc sine, cosine, arc cosine, tangent and arc tangent of z, respectively. |
SEE ALSO
AG_DataSource(3), AG_Intro(3), M_Matrix(3), M_Quaternion(3), M_Real(3), M_Vector(3) |
HISTORY
The M_Complex structure first appeared in Agar 1.3.4. |