Affiliation:
1. The University of Texas at San Antonio
2. Los Alamos National Laboratory
3. Southwest Research Institute
Abstract
Abstract
It is well known that both complex and dual numbers can be employed to obtain machine precision first-order derivatives; however, neither, on their own, can compute machine precision 2nd order derivatives. To address this limitation, it is demonstrated in this paper that combined dual-complex numbers can be used to compute machine precision 1st and 2nd order derivatives. The dual-complex approach is simpler than utilizing multicomplex or hyper-dual numbers as existing dual libraries can be used as is or easily augmented to accept complex numbers, and the complexity of developing, integrating, and deploying multicomplex or hyper-dual libraries is avoided. The efficacy of this approach is demonstrated for both univariant and multivariate functions with examples from the Python, Julia, and Mathematica languages.
Publisher
Research Square Platform LLC
Reference36 articles.
1. Using Complex Variables to Estimate Derivatives of Real Functions;Squire W;SIAM Rev,1998
2. MultiZ: A library for computation of high order derivatives using multicomplex or multidual numbers;Aguirre-Mesa AM;ACM Trans. Math. Softw,2020
3. Khandelwal, Ujjwal, “Dual numbers and automatic differentiation using Python,” https://github.com/ujjwalkhandelwal/Dual-numbers-and-automatic-differentiation-using-Python, Accessed Jan. 2024
4. Forward-mode automatic differentiation in Julia. arXiv preprint arXiv:1607.07892;Revels J,2016
5. Julia ForwardDiff package.(https://github.com/JuliaDiff/ForwardDiff.jl)., Accessed Jan 2024