Forward-mode automatic differentiation over Luna Flow algebraic and arithmetic structures.
Dependencies
Dual[T] = value + tangent ε, ε² = 0let d = @autodiff.diff(fn(x) { x * x + x.sin() }, 2.0)J[row = output_index, col = input_index]f(x, y) = [x + y, x*y, x²]
J = [
[1, 1],
[y, x],
[2x, 0]
]p(Dual::variable(x)) = Dual(p(x), p'(x))let p = @dense.DensePolynomial::from_coefficients([1.0, 2.0, 0.0, 1.0])
let result = @poly.eval_dual(p, @poly.Dual::variable(3.0))
// result = Dual(34, 29)Forward-mode automatic differentiation over Luna Flow algebraic and arithmetic structures.
Dependencies