Use TOL wherever it is an array, and tol where it is not an array.
Annotate the types for tol and TOL to minimize confusion when revisiting the
code in the future.