Return Integer.MAX_VALUE for values that are too big
762018
private int convertNonNegativeInteger(String str) {
    str = str.trim();
    DecimalDatatype decimal = new DecimalDatatype();
    if (!decimal.lexicallyAllows(str))
      return -1;
    // Canonicalize the value
    str = decimal.getValue(str, null).toString();
    // Reject negative and fractional numbers
    if (str.charAt(0) == '-' || str.indexOf('.') >= 0)
      return -1;
    try {
      return Integer.parseInt(str);
    }
    catch (NumberFormatException e) {
      // Map out of range integers to MAX_VALUE
      return Integer.MAX_VALUE;
    }
  }
1156972
def max=(m)
      m = m.to_i
      raise ArgumentError.new('Maximum value must be greater than 0') unless m > 0
      @max_threads = m
      @min_threads = m if m < @min_threads
      resize if m < size
      m
    end
616726
public static int getMaxValue(int... nums) {
        int max = 0;
        int last = nums.length - 1;
        for (int i = 0; i < last; i += ValueConsts.TWO_INT) {
            max = Integer.max(max, Integer.max(nums[i], nums[i + 1]));
        }
        return Integer.max(max, nums[last]);
    }
396787
@Override
    public long getMaxX() {
        if (!excludeOutOfRangeValues) {
            return super.getMaxX();
        } else {
            long retMax = 0;
            Iterator<Long> iter = values.keySet().iterator();

            if (iter.hasNext()) {
                retMax = iter.next();
            }
            long excludeValue = getGranulationValue() * excludeCount;
            while (iter.hasNext()) {
                long value = iter.next();

                if (value > retMax) {
                    if ((value - retMax) < excludeValue) {
                        retMax = value;
                    }
                }
            }
            return retMax;
        }
    }
989806
private void calcMinMax() throws IOException {
        hasMin = false;
        hasMax = false;
        if (excluded != null) {
            for (int i = 0; i < excluded.size(); i++) {
                GeneralSubtree subtree = excluded.get(i);
                if (subtree.getMinimum() != 0)
                    hasMin = true;
                if (subtree.getMaximum() != -1)
                    hasMax = true;
            }
        }

        if (permitted != null) {
            for (int i = 0; i < permitted.size(); i++) {
                GeneralSubtree subtree = permitted.get(i);
                if (subtree.getMinimum() != 0)
                    hasMin = true;
                if (subtree.getMaximum() != -1)
                    hasMax = true;
            }
        }
        minMaxValid = true;
    }
463710
def lambda_max(self):
        """"""
        return ((const.b_wien.value / self.temperature) * u.m).to(u.AA).value
586460
def _max(ctx, *number):
    
    if len(number) == 0:
        raise ValueError("Wrong number of arguments")

    result = conversions.to_decimal(number[0], ctx)
    for arg in number[1:]:
        arg = conversions.to_decimal(arg, ctx)
        if arg > result:
            result = arg
    return result
1371463
def set(self, value: int):
        
        max_value = int(''.join(['1' for _ in range(self._bit_width)]), 2)

        if value > max_value:
            raise ValueError('the value {} is larger than '
                             'the maximum value {}'.format(value, max_value))

        self._value = value
        self._text_update()
716961
def _limit(lower, upper):
    """"""
    if ((lower < 0) or (upper <= 0) or (upper < lower)):
        raise Exception("Illegal argument to _limit")
    return unicod("{%d,%d}") % (lower, upper)
650219
def max_len(iterable, minimum=0):
    
    try:
        result = max(map(len, iterable))
    except ValueError:
        result = minimum
    return minimum if result < minimum else result
247438
public static BigDecimal maximum(BigDecimal... values)
    {
        int len = values.length;
        if (len == 1)
        {
            if (values[0] == null)
            {
                throw new IllegalArgumentException("Cannot passed null BigDecimal entry to maximum()");
            }
            return values[0];
        }
        BigDecimal current = values[0];

        for (int i=1; i < len; i++)
        {
            if (values[i] == null)
            {
                throw new IllegalArgumentException("Cannot passed null BigDecimal entry to maximum()");
            }
            current = values[i].max(current);
        }

        return current;
    }
359445
def max(self):
        
        return int(self._max) if not np.isinf(self._max) else self._max
201563
def max(x, y, context=None):
    
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_max,
        (
            BigFloat._implicit_convert(x),
            BigFloat._implicit_convert(y),
        ),
        context,
    )
496856
function intmax( type ) {
	if ( !arguments.length ) {
		return TYPES.int32;
	}
	if ( !isString( type ) ) {
		throw new TypeError( 'intmax()::invalid input argument. Must provide an input string primitive. Value: `' + type + '`.' );
	}
	if ( !TYPES.hasOwnProperty( type ) ) {
		throw new Error( 'intmax()::invalid input argument. Unrecognized integer type. Must be one of the following: \"' + Object.keys( TYPES ).join( '\", \"' ) + '\". Value: `' + type + '`.' );
	}
	return TYPES[ type ];
}
902195
def maxBoundSize(self):
        """"""
        b = self.polydata(True).GetBounds()
        return max(abs(b[1] - b[0]), abs(b[3] - b[2]), abs(b[5] - b[4]))
190822
def _len_int(obj):
    '''
    '''
    if obj:
        n, i = 1, abs(obj)
        if i > _digitmax:
             # no log(x[, base]) in Python 2.2
            n += int(log(i) * _digitlog)
    else:  # zero
        n = 0
    return n
1080169
def maximum(self):
        """"""
        value = self._schema.get("maximum", None)
        if value is None:
            return
        if not isinstance(value, NUMERIC_TYPES):
            raise SchemaError(
                "maximum value {0!r} is not a numeric type".format(
                    value))
        return value