Returns the next number greater or equal num that is power of 2.
320471
public static long nextPowerOf2(long num) {
    final long highBit = Long.highestOneBit(num);
    return (highBit == num) ? num : highBit << 1;
  }
139370
public static int multiply(double num1, double num2) {
        BigDecimal num1Bd = new BigDecimal(Double.toString(num1));
        BigDecimal num2Bd = new BigDecimal(Double.toString(num2));
        MathContext mathContext = new MathContext(num1Bd.precision(), RoundingMode.HALF_UP);
        return num1Bd.multiply(num2Bd, mathContext).intValue();
    }
1263458
function(v) {
                if (isNumber(v)) {
                    v = Math.min(Math.max(0, v), 255);
                    var i, next;
                    for (i=0; i<256; i=i+51) {
                        next = i+51;
                        if (v >= i && v <= next) {
                            return (v-i > 25) ? next : i;
                        }
                    }
                }

                return v;
            }
144998
def _next_ifd(self, ifd):
        """"""
        entries = self.s2n(ifd, 2)
        next_ifd = self.s2n(ifd + 2 + 12 * entries, 4)
        if next_ifd == ifd:
            return 0
        else:
            return next_ifd
83788
def max_or_none(val1, val2):
    """"""
    return max(val1, val2, key=lambda x: -sys.maxint if x is None else x)
721149
function(sbm, n) {
    if (n == 0) {
      return this.identity(n)
    } else if (n == 1) {
      return sbm
    } else if (n % 2 == 0) {
      return this.pow(this.multiply(sbm, sbm), n/2)
    } else {
      return this.multiply(sbm, this.pow(this.multiply(sbm, sbm), (n-1)/2))
    }
  }
605189
public static int multiply(long num1, double num2) {
        double num1D = ((Long) num1).doubleValue();
        return multiply(num1D, num2);
    }
638314
private float MAX(float first, float second, float third) {

        float max = Integer.MIN_VALUE;
        if (first > max) {
            max = first;
        }
        if (second > max) {
            max = second;
        }
        if (third > max) {
            max = third;
        }
        return max;
    }
568488
function compare(a, b) {
  if (isNaN(a.short_version)) return 1;
  if (isNaN(b.short_version)) return -1;
  return Number(a.short_version) - Number(b.short_version);
}
1159675
def lcm(num1, num2):
    

    if num1 > num2:
        bigger = num1
    else:
        bigger = num2
    while True:
        if bigger % num1 == 0 and bigger % num2 == 0:
            return bigger
        bigger += 1
1292843
def get_next(self, num_bytes=None):
        """"""
        if num_bytes is None:
            return self._data[self._offset:]
        else:
            return self._data[self._offset:self._offset + num_bytes]
177574
private static int nextPowerOfTwo(int v) {
        assert v >= 0;
        v--;
        v |= v >> 1;
        v |= v >> 2;
        v |= v >> 4;
        v |= v >> 8;
        v |= v >> 16;
        v++;
        return v;
    }
1264657
def pow2(x: int, p: int) -> int:
    """"""
    while p > 0:
        x = x * x % q
        p -= 1
    return x
72260
public static function greaterThan($n1, $n2)
    {
        $n1 = self::round($n1, 2);
        $n2 = self::round($n2, 2);

        return (bccomp($n1, $n2, self::$scale) > 0);
    }
527918
function next(c) {
        return c === 0 || c === null
            ? compareNext ? compareNext(a, b) : c
            : c;
    }
439462
def p_next(self):
        ""
        try:
            self.pos += 1
            return self.input[self.pos - 1]
        except IndexError:
            self.pos -= 1
            return None
1165000
def _get_next_nn_id(self):
        """"""
        self._nn_id = self._nn_id + 1 if self._nn_id < 126 else 1
        return self._nn_id * 2