code: public int bin( double col_data ) {
      if(Double.isNaN(col_data)) return _nbin; // NA bucket
      if (Double.isInfinite(col_data)) // Put infinity to most left/right bin
        if (col_data<0) return 0;
        else return _nbin-1;
      assert _min <= col_data && col_data < _maxEx : "Coldata " + col_data + " out of range " + this;
      // When the model is exposed to new test data, we could have data that is
      // out of range of any bin - however this binning call only happens during
      // model-building.
      int idx1;
  
      double pos = _hasQuantiles ? col_data : ((col_data - _min) * _step);
      if (_splitPts != null) {
        idx1 = Arrays.binarySearch(_splitPts, pos);
        if (idx1 < 0) idx1 = -idx1 - 2;
      } else {
        idx1 = (int) pos;
      }
      if (idx1 == _nbin) idx1--; // Roundoff error allows idx1 to hit upper bound, so truncate
      assert 0 <= idx1 && idx1 < _nbin : idx1 + " " + _nbin;
      return idx1;
    }
docs: Interpolate d to find bin#