Or even
[$]f(x) = cos(sin(sin(cos(x))))[$]
Good luck.
What's the derivative, T4A? At any point x of your choosing.
I thought you specifically wanted the derivative of [$]f(x) = e^{e^{e^x}}[$] computed with the highest-possible performance and without restriction on using calculus (another unstated requirement). And my answer has higher performance than your answer but it's only for that specific f(x). Was this second f(x) meant to be a second, independent quiz question or was it related to the first one?
It now seems that this second example implies a change in the requirements from creating highest-possible-performance computation of the first derivative of a specific formula to a lower-performance but generalized computation of derivatives of various functions. Right? If you are seeking a general method that handles both [$]f(x) = e^{e^{e^x}}[$] and [$]f(x) = cos(sin(sin(cos(x))))[$] as well as other f(x), what are the bounds on f(x)?
How about [$]f(x) = 1/(sin(x))[$] evaluated at x=0.001? When I use your method of [$]f(z)[$] where [$]z = x + ih[$], with h = 0.001, and compute the imaginary part of [$]f(z)/h[$], I get f'(0.001) ≈ -499,999.833335 whereas the correct answer is 1,000,000. Is there a robust approach to picking h?