/* Check if reduced-form input >= 2^255-19
765654
function is_overflow (x) {
        return (
            ((x[0] > P26 - 19)) &&
                ((x[1] & x[3] & x[5] & x[7] & x[9]) === P25) &&
                ((x[2] & x[4] & x[6] & x[8]) === P26)
            ) || (x[9] > P25);
    }
1355378
function fmtShort(ms) {
  var msAbs = Math.abs(ms);
  if (msAbs >= d) {
    return Math.round(ms / d) + 'd';
  }
  if (msAbs >= h) {
    return Math.round(ms / h) + 'h';
  }
  if (msAbs >= m) {
    return Math.round(ms / m) + 'm';
  }
  if (msAbs >= s) {
    return Math.round(ms / s) + 's';
  }
  return ms + 'ms';
}
807163
private int minLimit(int input, int min) {
        if (input < min) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Config: " + input + " too small.");
            }
            return min;
        }
        return input;
    }
1231810
function isIntegerBuffer(buf) {
  var sign = '-'.charCodeAt(0)
    , i;

  // empty string is not an integer
  if(!buf.length) return false;

  for(i = 0;i < buf.length;i++) {
    if(!i && buf[i] === sign) continue;
    if(!~NUMBERS.indexOf(buf[i])) return false;
  }

  return true;
}
601310
public boolean isNumeral(final String input) {
        for (int i = 0; i < input.length(); i++) {
            if (!isNumeral(input.charAt(i))) {
                return false;
            }
        }
        return true;
    }
1178233
function checkPseudoClass2(i) {
  const start = i;
  let l;

  // Skip `:`.
  i++;

  if (i >= tokensLength) return 0;

  if (l = checkIdentOrInterpolation(i)) i += l;
  else return 0;

  if (i >= tokensLength ||
      tokens[i].type !== TokenType.LeftParenthesis) return 0;

  const right = tokens[i].right;

  // Skip `(`.
  i++;

  if (l = checkSC(i)) i += l;

  if (l = checkIdentOrInterpolation(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (i !== right) return 0;

  // Skip `)`.
  i++;

  return i - start;
}
358683
function leadingZeros(number, minLength = 0, padWith = '0') {
  const stringNumber = number.toString()
  const paddingLength = minLength - stringNumber.length
  return paddingLength > 0 ? `${padWith.repeat(paddingLength)}${stringNumber}` : stringNumber
}
613390
function decode5(s) {
  assert.equal(s.length, 5)
  const [ upper, belowUpper, mid, aboveLower, lower ] = s
  return (decode(upper) << 24) | (decode(belowUpper) << 18)
    | (decode(mid) << 12) | (decode(aboveLower) << 6) | decode(lower)
}
1100743
public static boolean isAllDelimiter(byte[] sString)
    {
        int nLen = sString.length;
        int i = 0;

        while (i < nLen - 1 && (getUnsigned(sString[i]) == 161 || getUnsigned(sString[i]) == 163))
        {
            i += 2;
        }
        if (i < nLen)
            return false;
        return true;
    }
721111
public static boolean isAlphanumeric(final String input) {
        for (int i = 0; i < input.length(); i++) {
            if (!Character.isLetterOrDigit(input.charAt(i))) return false;
        }
        return true;
    }
424445
function trimNumericField(input) {
		while (input.length > 1 && input.charAt(0) === '0') {
			input = input.substring(1);
		}

		return input;
	}
1138318
function littleEndianToUint32(data, offset)
{
	return (littleEndianToUint8(data, offset + 3) << 24) +
		(littleEndianToUint8(data, offset + 2) << 16) +
		(littleEndianToUint8(data, offset + 1) << 8) +
		littleEndianToUint8(data, offset)
}
491563
function signedInt16(num) {
	var high = Math.abs(num)>>8&127, low = num&255;
	if(num<0) { high = 255-high; if(!low) { high++;
	if(high>255) high = 128; }} return [high, low];
}
452664
@Override
    public boolean isValid(Object input) {
        int value;
        try {
            value = Integer.parseInt(input.toString());
        } catch (NumberFormatException e) {
            return false;
        }

        if (minAllowedValue != null && value < minAllowedValue)
            return false;
        if (maxAllowedValue != null && value > maxAllowedValue)
            return false;
        return true;
    }
878196
function(value)
	{
		if (value == 'thin')
		{
			value = '2';
		}
		else if (value == 'medium')
		{
			value = '4';
		}
		else if (value == 'thick')
		{
			value = '6';
		}
		
		value = parseFloat(value);
		
		if (isNaN(value))
		{
			value = 0;
		}
		
		return value;
	}
978616
function(b) {
  var b2 = b.getByte();
  if(b2 === 0x80) {
    return undefined;
  }

  // see if the length is "short form" or "long form" (bit 8 set)
  var length;
  var longForm = b2 & 0x80;
  if(!longForm) {
    // length is just the first byte
    length = b2;
  } else {
    // the number of bytes the length is specified in bits 7 through 1
    // and each length byte is in big-endian base-256
    length = b.getInt((b2 & 0x7F) << 3);
  }
  return length;
}
341529
private boolean checkShapeTooSmall(Polygon2D_F64 input) {
		// must be longer than the border plus some small fudge factor
		double minLength = cornerOffset*2 + 2;
		for (int i = 0; i < input.size(); i++) {
			int j = (i+1)%input.size();
			Point2D_F64 a = input.get(i);
			Point2D_F64 b = input.get(j);
			if( a.distance2(b) < minLength*minLength )
				return true;
		}

		return false;
	}