Skip to content
Oakfield Operator Calculus Function Reference Site

Absolute Value

The absolute value returns the nonnegative magnitude of a real input:

x={x,x0,x,x<0|x| = \begin{cases} x, & x \ge 0,\\ -x, & x < 0 \end{cases}

The map :R[0,)|\cdot|:\mathbb{R}\to[0,\infty) is defined for all real inputs and returns nonnegative reals.


x=x|-x| = |x|
x+yx+y|x+y| \le |x| + |y|
ddxx=sgn(x),x0\frac{d}{dx}|x| = \operatorname{sgn}(x), \qquad x \ne 0

The nondifferentiability at x=0x=0 motivates smooth surrogates when gradients are required.


xxx\lvert x\rvert
0000
1111
1-111

For x0x\ne 0, limp0+xp=1\lim_{p\to 0^+}|x|^p = 1 (while 0p=0|0|^p=0 for p>0p>0), so the limit p0+p\to 0^+ produces a discontinuity at the origin.


Log-absolute-value compresses magnitudes in log space. Power functions and fractional powers build magnitude-dependent nonlinearities. Euclidean norms generalize x|x| to vectors.


Oakfield uses absolute value and magnitude computations throughout core operators and diagnostics:

  • Diagnostics compute mean_abs, max_abs, RMS, and magnitude gates for phase metrics.
  • Remainder operator supports ABS and LOG_ABS nonlinearities (with fabs/log1p-style handling).
  • Feature extraction and polar modes rely on magnitudes like z|z| to form unit directions z/zz/|z| and to apply thresholding.

Absolute value formalizes “distance from zero” on the real line and is the one-dimensional prototype for norms and metrics.

It remains a core primitive in analysis and numerical modeling, especially for magnitude-based diagnostics and robust objectives.


  • Rudin, Principles of Mathematical Analysis
  • Kreyszig, Introductory Functional Analysis with Applications