Conal Elliot&#x27;s paper on the subject is a really good starting point: <a href="http:&#x2F;&#x2F;conal.net&#x2F;papers&#x2F;beautiful-differentiation&#x2F;beautiful-differentiation.pdf" rel="nofollow">http:&#x2F;&#x2F;conal.net&#x2F;papers&#x2F;beautiful-differentiation&#x2F;beautiful-...</a>