PAL Mathematics: Complex Scalar Arithmetic
Conjugation, inversion, multiplication, division, magnitude, and magnitude approximations for complex scalar values.
|
|
|---|---|
KiratPalAbscmSignature
T_FLOAT KiratPalAbscm(T_COMPLEX cValue);Description
Calculates the element-wise absolute value/magnitude. Mathematical operation
\(|z|=\sqrt{(\Re z)^2+(\Im z)^2}\) |
|
KiratPalComplexAbsSignature
T_FLOAT KiratPalComplexAbs(T_COMPLEX cValue);Description
Calculates the element-wise absolute value/magnitude. Mathematical operation
\(|z|=\sqrt{(\Re z)^2+(\Im z)^2}\) |
|
KiratPalComplexAbsApproxSignature
T_FLOAT KiratPalComplexAbsApprox(T_COMPLEX cValue);Description
Fast approximation of the magnitude of a complex number. Mathematical operation
\(y=\sqrt{(\Re z)^2+(\Im z)^2}\); the current generic path uses the ordinary square root, so this is numerically the same expression as the exact magnitude. |
|
KiratPalComplexAbsSquaredSignature
T_FLOAT KiratPalComplexAbsSquared(T_COMPLEX cValue);Description
Returns the squared magnitude of a complex number. Mathematical operation
\(|z|^2=(\Re z)^2+(\Im z)^2\) |
|
KiratPalComplexBiasedAbsApproxSignature
T_FLOAT KiratPalComplexBiasedAbsApprox(T_COMPLEX cValue);Description
Fast deliberately biased approximation of the magnitude of a complex number. Mathematical operation
\(a(z)=|\Re z|+|\Im z|\) (L1 magnitude; intentionally biased high relative to the Euclidean magnitude). |
|
KiratPalComplexConjSignature
void KiratPalComplexConj(T_COMPLEX* cSource, T_COMPLEX* cTarget);Description
Calculates the element-wise complex conjugate. Mathematical operation
\(y=z^*=\Re z-j\Im z\) |
|
KiratPalComplexConjMultSignature
void KiratPalComplexConjMult(T_COMPLEX* cFactor, T_COMPLEX* cConjFactor, T_COMPLEX* cProduct);Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination. Mathematical operation
\(y=z_1z_2^*\) |
|
KiratPalComplexConjMultAccSignature
void KiratPalComplexConjMultAcc(T_COMPLEX* cFactor, T_COMPLEX* cConjFactor, T_COMPLEX* cProduct);Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination. Mathematical operation
\(y\leftarrow y+z_1z_2^*\) |
|
KiratPalComplexDivSignature
void KiratPalComplexDiv(T_COMPLEX* cDividend, T_COMPLEX* cDivisor, T_COMPLEX* cQuotient);Description
Divides two complex numbers. Mathematical operation
\(q=\dfrac{z_1z_2^*}{|z_2|^2+\varepsilon_{\mathrm{SYS}}}\) |
|
KiratPalComplexInvSignature
void KiratPalComplexInv(T_COMPLEX* cValue);Description
Operation on complex scalar values. Mathematical operation
\(z\leftarrow\dfrac{z^*}{|z|^2+\varepsilon_{\mathrm{SYS}}}\) |
|
KiratPalComplexMultSignature
void KiratPalComplexMult(T_COMPLEX* cSourceDest, T_COMPLEX* cFactor);Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination. Mathematical operation
\(z_1\leftarrow z_1z_2\) |
|
KiratPalComplexMultAccSignature
void KiratPalComplexMultAcc(T_COMPLEX* cFactor1, T_COMPLEX* cFactor2, T_COMPLEX* cProduct);Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination. Mathematical operation
\(y\leftarrow y+z_1z_2\) |
|
KiratPalComplexMultToDestSignature
void KiratPalComplexMultToDest(T_COMPLEX* cFactor1, T_COMPLEX* cFactor2, T_COMPLEX* cProduct);Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination. Mathematical operation
\(y=z_1z_2\) |
|
KiratPalFloatComplexDivSignature
void KiratPalFloatComplexDiv(T_COMPLEX* cDividend, T_FLOAT* fDivisor, T_COMPLEX* cQuotient);Description
Divides a complex number by a real scalar using a small numerical safeguard in the denominator. Mathematical operation
\(q=(\Re z+j\Im z)/(a+10^{-10})\), i.e. \(\Re q=\Re z/(a+10^{-10})\) and \(\Im q=\Im z/(a+10^{-10})\) on the generic ANSI-C path. |
|
KiratPalFloatComplexMultSignature
void KiratPalFloatComplexMult(T_COMPLEX* cSourceDest, T_FLOAT fFactor);Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination. Mathematical operation
\(z\leftarrow a\,z\) |
|
KiratPalFloatComplexMultAccSignature
void KiratPalFloatComplexMultAcc(T_FLOAT* fFactor, T_COMPLEX* cFactor, T_COMPLEX* cProduct);Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination. Mathematical operation
\(y\leftarrow y+a\,z\) |
|
KiratPalFloatComplexMultToDestSignature
void KiratPalFloatComplexMultToDest(T_FLOAT fFactor, T_COMPLEX* cFactor, T_COMPLEX* cProduct);Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination. Mathematical operation
\(y=a\,z\) |