Skip to content
Oakfield Operator Calculus Function Reference Site

Log-Absolute Value

For xR{0}x \in \mathbb{R}\setminus\{0\},

f(x)=logxf(x) = \log |x|

captures the logarithm of the magnitude while discarding sign.

Defined for nonzero real inputs; outputs are real and handle wide dynamic ranges compactly.


logxy=logx+logy\log|xy| = \log|x| + \log|y|
ddxlogx=1x,x0\frac{d}{dx}\log|x| = \frac{1}{x}, \qquad x \ne 0
logx=logx\log|-x| = \log|x|

xxlogx\log\lvert x\rvert
1100
1-100

As x0x\to 0, logx\log|x|\to -\infty, and as x|x|\to\infty, logx\log|x|\to\infty.


Absolute value x|x| supplies the magnitude and log(x)\log(x) provides the sign-sensitive logarithm on (0,)(0,\infty). Log-sum-exp is a separate stabilized log-domain primitive used for aggregating exponentials.


Oakfield primarily uses log-of-magnitude ideas via stabilized forms rather than a raw log(|x|):

  • Remainder operator: SIM_REMAINDER_NONLINEARITY_LOG_ABS evaluates log1p(|x|/\epsilon) to provide a safe “log magnitude” response for both small and large values.
  • Thermostat soft clamps: smooth clamp logic uses log1p(exp(\cdot)), which is closely related to log-of-magnitude compression in practice (avoids hard clipping artifacts).
  • Diagnostics: several statistics/metrics operate in log space (e.g. spectral entropy uses log over normalized power), though not always as log(|x|) specifically.

Logarithmic mappings of magnitude are a standard technique for representing wide dynamic ranges, appearing across scientific measurement and signal analysis.

logx\log|x| is frequently used as a numerically stable way to compare multiplicative magnitudes additively, while intentionally discarding sign information.


  • Bracewell, The Fourier Transform and Its Applications
  • NIST Digital Library of Mathematical Functions (DLMF), §4