https://123dok.net/document/zlg91jry-mixed-language-automatic-differentiation.html