This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Open AccessArticle
Hyper–Dual Numbers: A Theoretical Foundation for Exact Second Derivatives
by
Sung Bum Park
Sung Bum Park 1
and
Ji Eun Kim
Ji Eun Kim 2,*
1
Department of Automotive Materials and Components Engineering, Dongguk University, Gyeongju 38066, Republic of Korea
2
Department of Mathematics, Dongguk University, Gyeongju 38066, Republic of Korea
*
Author to whom correspondence should be addressed.
Mathematics 2025, 13(24), 3909; https://doi.org/10.3390/math13243909 (registering DOI)
Submission received: 16 September 2025
/
Revised: 22 November 2025
/
Accepted: 2 December 2025
/
Published: 6 December 2025
Abstract
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.
Share and Cite
MDPI and ACS Style
Park, S.B.; Kim, J.E.
Hyper–Dual Numbers: A Theoretical Foundation for Exact Second Derivatives. Mathematics 2025, 13, 3909.
https://doi.org/10.3390/math13243909
AMA Style
Park SB, Kim JE.
Hyper–Dual Numbers: A Theoretical Foundation for Exact Second Derivatives. Mathematics. 2025; 13(24):3909.
https://doi.org/10.3390/math13243909
Chicago/Turabian Style
Park, Sung Bum, and Ji Eun Kim.
2025. "Hyper–Dual Numbers: A Theoretical Foundation for Exact Second Derivatives" Mathematics 13, no. 24: 3909.
https://doi.org/10.3390/math13243909
APA Style
Park, S. B., & Kim, J. E.
(2025). Hyper–Dual Numbers: A Theoretical Foundation for Exact Second Derivatives. Mathematics, 13(24), 3909.
https://doi.org/10.3390/math13243909
Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details
here.
Article Metrics
Article Access Statistics
For more information on the journal statistics, click
here.
Multiple requests from the same IP address are counted as one view.