Hyper–Dual Numbers: A Theoretical Foundation for Exact Second Derivatives
Second-order derivative information, including mixed curvature, is central to Newton and trust-region optimization, uncertainty quantification, and simulation-based design. Classical finite differences (FD) remain popular but require delicate step-size tuning and can suffer from cancelation and noise amplification. Complex-step differentiation offers machine-precision gradients without subtractive cancelation, yet many second-derivative complex-step formulas reintroduce differencing. Hyper-dual numbers provide an algebraically principled alternative: by lifting real code to a four-component commutative nilpotent algebra, one obtains exact first and mixed second derivatives from a single evaluation, without finite differencing. This article gives a consolidated theoretical and experimental foundation for hyper-dual numbers. We formalize the algebra, prove exact Taylor truncation at second order, derive coefficient–extraction formulas for gradients and Hessians, and state assumptions for exactness, including limitations at non-smooth points and the need to branch on real parts. We present implementation patterns and language skeletons (C++, Python 3.11.5, MATLAB R2023b), and we provide fair numerical comparisons with FD, complex-step, and AD baselines. Stability tests under additive noise and ill-conditioning, together with runtime and memory profiling, demonstrate that hyper-dual coefficients are robust and reproducible in floating-point arithmetic, particularly for black-box codes where Hessian information is needed but differencing is fragile.
Authors
- Sung Bum Park (ORCID: https://orcid.org/0000-0001-8066-0129)
- Ji Eun Kim (ORCID: https://orcid.org/0000-0002-4869-0552)
Institutions
- Dongguk University (KR)
Publication Details
- Journal
- Mathematics
- Published
- 2025-12-06
- DOI
- https://doi.org/10.3390/math13243909
- Primary Topic
- Numerical Methods and Algorithms
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Dongguk University