HyperDualNumbers
Hyper-dual numbers can be used to compute first and second derivatives numerically without the cancellation errors of finite-differencing schemes.
The initial Julia implementation (and up to v3.0.1) is directly based on the C++ implementation by Jeffrey Fike and Juan J Alonso, both of Stanford University, department of Aeronautics and Astronautics and is described in the paper:
The Development of Hyper-Dual Numbers for Exact Second Derivative Calculations
The early versions have been derived/written by Rob J Goedman (goedman@icloud.com).
HyperDualNumbers.jl v4.0.0 has been completely redone by Benoit Pasquier and follows the structure of the JuliaDiff/DualNumbers package.]
Creation of a HyperDualNumber
HyperDualNumbers.Hyper
— Method.Creation of a HyperDuakNumber
hn = Hyper(2.0, 1.0, 1.0, 0.0)
Symbolic derivative list
HyperDualNumbers.symbolic_derivative_list
— Constant.Symbolic derivative list
The format is a list of (Symbol,Expr,Expr) tuples.
Entries in each tuple:
* `:f ` : Function symbol
* `:df` : Symbolic expression for first derivative
* `:d²f` : Symbolic expression for second derivative
The symbol :x is used within deriv_expr for the point at which the derivative should be evaluated.
Example of a tuple in the list
(:sqrt, :(1/2/sqrt(x)), :(-1/4/x^(3/2)))
Fields of a HyperDualNumber
HyperDualNumbers.ε₁
— Constant.ɛ₁ contains the first derivative after the evaluation
HyperDualNumbers.ε₂
— Constant.ɛ₂ contains the first derivative after the evaluation
HyperDualNumbers.ε₁ε₂
— Constant.ɛ₁ɛ₂ contains the second derivative after the evaluation