3 ms·
One nice thing about this technique is that its time complexity is essentially the same as evaluating the original function. This property is shared by dual num
by jwmerrill 12y ago
One nice thing about this technique is that its time complexity is essentially the same as evaluating the original function. This property is shared by dual number differentiation mentioned by iadunning above.
Try symbolically differentiating deeply nested functions, and you will see that you end up with n^2 terms, where n is the depth of the nesting. E.g. Try differentiating
n = 10
for (i=0; i<n; i++)
x = sin(x)
Then notice that evaluating this function with a complex argument is only O(n), not O(n^2).