PAL Mathematics: Logarithms, Exponentials, and Trigonometry

Scalar logarithmic, exponential, power, and trigonometric functions.

PAL Mathematics: Logarithms, Exponentials, and Trigonometry — 18 functions

KiratPalAcos

Signature
T_FLOAT KiratPalAcos(T_FLOAT fValue);
Description
Calculates the element-wise arccosine.
Mathematical operation
\(y=\arccos x\)

KiratPalAsin

Signature
T_FLOAT KiratPalAsin(T_FLOAT fValue);
Description
Calculates the arcsine.
Mathematical operation
\(y=\arcsin x\)

KiratPalAtan2

Signature
T_FLOAT KiratPalAtan2(T_FLOAT fY, T_FLOAT fX);
Description
Calculates the four-quadrant arctangent atan2(y,x).
Mathematical operation
\(\theta=\operatorname{atan2}(y,x)\)

KiratPalCos

Signature
T_FLOAT KiratPalCos(T_FLOAT fValue);
Description
Calculates the element-wise cosine.
Mathematical operation
\(y=\cos x\)

KiratPalExp

Signature
T_FLOAT KiratPalExp(T_FLOAT fValue);
Description
Power/exponential operation.
Mathematical operation
\(y=e^x\)

KiratPalLn

Signature
T_FLOAT KiratPalLn(T_FLOAT fValue);
Description
Calculates the element-wise natural logarithm.
Mathematical operation
\(y=\ln(x+\varepsilon_{\mathrm{SYS}})\)

KiratPalLnUnsafe

Signature
T_FLOAT KiratPalLnUnsafe(T_FLOAT fValue);
Description
Calculates the natural logarithm without an internal zero/range check. The caller must ensure that all inputs are valid and positive.
Mathematical operation
\(y=\ln x\)

KiratPalLog10

Signature
T_FLOAT KiratPalLog10(T_FLOAT fValue);
Description
Calculates the element-wise base-10 logarithm; Mult variants scale the result.
Mathematical operation
\(y=\log_{10}(x+\varepsilon_{\mathrm{SYS}})\)

KiratPalLog10Unsafe

Signature
T_FLOAT KiratPalLog10Unsafe(T_FLOAT fValue);
Description
Calculates the element-wise base-10 logarithm; Mult variants scale the result.
Mathematical operation
\(y=\log_{10}x\)

KiratPalLog2

Signature
T_FLOAT KiratPalLog2(T_FLOAT fValue);
Description
Logarithm/log-domain helper operation.
Mathematical operation
\(y=\log_2(x+\varepsilon_{\mathrm{SYS}})\)

KiratPalLog2Unsafe

Signature
T_FLOAT KiratPalLog2Unsafe(T_FLOAT fValue);
Description
Logarithm/log-domain helper operation.
Mathematical operation
\(y=\log_2x\)

KiratPalLogSum

Signature
T_FLOAT KiratPalLogSum(T_FLOAT fX, T_FLOAT fY);
Description
Stable log-sum-exp operation that evaluates log(exp(x)+exp(y)) without unnecessarily large intermediate exponential values.
Mathematical operation
\(z=\max(x,y)+\ln\!\left(1+e^{\min(x,y)-\max(x,y)}\right)\) (stable log-sum-exp).

KiratPalPow

Signature
T_FLOAT KiratPalPow(T_FLOAT fBase, T_FLOAT fValue);
Description
Calculates element-wise powers.
Mathematical operation
\(y=a^x\)

KiratPalPow10

Signature
T_FLOAT KiratPalPow10(T_FLOAT fValue);
Description
Calculates 10 raised to each input element.
Mathematical operation
\(y=10^x\)

KiratPalPow2

Signature
T_FLOAT KiratPalPow2(T_FLOAT fValue);
Description
Calculates element-wise powers.
Mathematical operation
\(y=2^x\)

KiratPalPowe

Signature
T_FLOAT KiratPalPowe(T_FLOAT fValue);
Description
Calculates element-wise powers.
Mathematical operation
\(y=e^x\)

KiratPalSin

Signature
T_FLOAT KiratPalSin(T_FLOAT fValue);
Description
Calculates the element-wise sine.
Mathematical operation
\(y=\sin x\)

KiratPalTan

Signature
T_FLOAT KiratPalTan(T_FLOAT fValue);
Description
Calculates the tangent.
Mathematical operation
\(y=\tan x\)