Differentiating regions

As a follow up to the previous post, check out how Chung-chieh Shan applied regions to a seemingly unrelated problem. His post begins by explaining how automatic (numerical) partial differentiation can be implemented, and goes on to show how to use regions to avoid mixing-up the variables being differentiated.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Dead link

Unfortunately the link is not working for me. Does anyone know of a working copy?


Hopefully that's just a temporary hiccup. In the meantime, here's a Google cache of the post.


Nice. This allows code to be written in a much more direct style, albeit at the cost of having to wrap many numeric values in "lifts", which might get tedious pretty quickly.

(Terminology note: this technique is relevant to forward-mode automatic differentiation. There is another mode (reverse) which is quite distinct, and has very different complexity properties.)