On Saturday, July 9, 2016 at 8:34:43 AM UTC-4, Davide Lasagna wrote: > > A more robust approach would be to test if abs(result - result_i) < \delta > for each result_i in a collection of previous results. However, this > operation scales linearly with the length of the collection >
There are lots of data structures you can use where that test would scale logarithmically with the length of the collection. e.g. you could use a sorted container like a red-black tree.