5 ms·
Still, the formula low + (high - low)/2 keeps the integers smaller (assuming everything is positive). That is to say, it can work with larger values before re
by kazinator 9y ago
Still, the formula low + (high - low)/2 keeps the integers smaller (assuming everything is positive). That is to say, it can work with larger values before requiring bignums compared to (low + high) / 2. On the other hand, it is more operations.