Numerical application of mean value theorem
The Endeavour 2024-05-07
Summary:
Suppose you’d like to evaluate the function for small values of z, say z = 10−8. This example comes from [1]. The Python code from numpy import exp def f(z): return (exp(z) - 1 - z)/z**2 print(f(1e-8)) prints -0.607747099184471. Now suppose you suspect numerical difficulties and compute your result to 50 decimal places using bc […]
The post Numerical application of mean value theorem first appeared on John D. Cook.