Quasi-Newton Methods Code Previous Gradient-Based Optimisation Next Forward-Mode Automatic Differentiation