convergence checking in specfun algorithms