Error propagation in adaptive Simpson algorithm
|
07-31-2018, 08:40 PM
Post: #7
|
|||
|
|||
RE: Error propagation in adaptive Simpson algorithm
So I modified the algorithm to not change the error tolerance at all, so the tolerance stays constant no matter how tiny is the subdivision (in other words, we halve the step, keep the tolerance the same).
I did the SIN(x) from 0 to 200 with 1E-8 tolerance and got the following results: Original algorithm: Error = -9.2E-16, number of evaluations = 28277 With fixed tolerance: Error = 2.0E-11, number of evaluations = 4025 Tried a couple of other functions as well and got errors much closer to the requested tolerance, so I think I will leave it with the fixed tolerance. It seems to be a closer match to the final tolerance that the user is requesting, and it's a time saver. For smaller tolerances it again over-delivers in accuracy on most functions (if I request 16 digits I get 21 for example). |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)