Fix issue 11598 - uniform could be faster for integrals

These changes retain the uniform quality of this function while, in the
common case, cutting the number of division operations in half.

Additionally, extra unittests were added to assure that all of the
bounds were tested properly.