Dual Number Forward Differentiation
Propagate values and directional derivatives through a computation using dual numbers.
Free theory articlePropagate values and directional derivatives through a computation using dual numbers.
Concept & interpretation
Propagate values and directional derivatives through a computation using dual numbers. Unlike reverse-mode automatic differentiation (backpropagation), forward-mode evaluates derivatives concurrently with the primal values.
Experiment
Explore forward automatic differentiation in the Dual Number Forward Differentiation module.
- Select the "Cubic" function and set the input x to 0.5. Observe the nodes in the operation graph.
- Change the "Seed v" to 0. The derivative through the graph becomes 0.
Observe the nodes in the operation graph, which explicitly maintain both the primal value (v) and the directional derivative (d). Change the "Seed v" to 0, which corresponds to evaluating f(x + 0ε) = f(x). The derivative through the graph becomes 0, isolating the primal value computation.
Next, select the "Reciprocal" function, representing f(x) = 1/x. At x = 0, the function is outside its domain. The value and the derivative both report "Unavailable", reflecting the real-world necessity of checking domains even when derivatives exist formally in abstract algebra.