Modified bisection function for integers in bandwidth.py