docs: function inferEndpoint(f, y, lower, e) {
        var comp; // comparison of f(e) and f(2*e)
  
        if (e != null) { return e; }
  
        e = lower ? -1 : 1;
        comp = f(e) < f(2 * e);
  
        while (f(e) > y !== comp) {
           e *= 2;
           if (-e > 1e200) {
              throw new Error('Binary search: Cannot find ' + (lower ? 'lower' : 'upper') + ' endpoint.');
           }
        }
        return e;
     }