* @return int
   */
  public static int integerLength(long x) {
    if (x < 0) {
      x = -1 - x;
    }
    if (x == 0) {
      return (0);
    }
    { int bot = 0;
      int top = Stella.LONG_INTEGER_BIT_WIDTH - 1;
      int split = 0;
      long rem = 0l;

      for (;;) {
        split = ((bot + top) >> 1);
        rem = (x >> split);
        if (rem == 1) {
          return (split + 1);
        }
        if (rem == 0) {
          top = split - 1;
        }
        else {
          bot = split + 1;
        }
      }
    }
  }