Avoiding miscomputation of subbox in error checks when a uniform sample in [a,b) is chosen arbitrarily close to b.