This will require major changes to how the code is organised and the use of bounded while loops. The adaptive Gauss-Kronrod algorithm for estimating the LD integrals (see #13) to a specific precision has to be implemented first.
Being able to specify a target relative precision will substantially improve performance with large sources.