correct range computations, it is difficult to do the more efficient single pass 3N/2 implementations correctly in this particular setting without costing more than they save