The unary {@code minus} operator. This is the equivalent to
the Java's {@code -} function. This function is not null-safe.

@param number a number.
@return {@code -number}
9651
@Pure
	@Inline(value = "(-($1.byteValue()))", constantExpression = true)
	public static int operator_minus(Byte number) {
		return -number.byteValue();
	}
127239
function (number, digits) {
    if (typeof number !== "number") { throw "not a number: " + number; }
    var s = number.toString();
    if (number.length > digits) {
      return number.substr(number.length - digits, number.length);
    }
    while (s.length < digits) {
      s = '0' + s;
    }
    return s;
  }
1321980
public static int parseInt(String number) throws NumberFormatException {
		if (StrUtil.isBlank(number)) {
			return 0;
		}

		// 对于带小数转换为整数采取去掉小数的策略
		number = StrUtil.subBefore(number, CharUtil.DOT, false);
		if (StrUtil.isEmpty(number)) {
			return 0;
		}

		if (StrUtil.startWithIgnoreCase(number, "0x")) {
			// 0x04表示16进制数
			return Integer.parseInt(number.substring(2), 16);
		}

		return Integer.parseInt(removeNumberFlag(number));
	}
817486
public static String formatBigDecimal(BigDecimal number) {
		if (number.signum() != -1) {
			return "+" + number.toString();
		} else {
			return number.toString();
		}
	}
844488
public static boolean isInteger(String number) {
        boolean result = false;
        try {
            Integer.parseInt(number);
            result = true;
        } catch (NumberFormatException e) {
        }
        return result;
    }
6255
public static String numberToString(Number number) throws JSONException {
		if (number == null) {
			throw new JSONException("Number must be non-null");
		}

		double doubleValue = number.doubleValue();
		JSON.checkDouble(doubleValue);

		// the original returns "-0" instead of "-0.0" for negative zero
		if (number.equals(NEGATIVE_ZERO)) {
			return "-0";
		}

		long longValue = number.longValue();
		if (doubleValue == longValue) {
			return Long.toString(longValue);
		}

		return number.toString();
	}
451737
public static void checkNotNegativeNumber(final Number number, final String name) throws IllegalArgumentException {
    if (number == null || number.doubleValue() < 0) {
      throw new IllegalArgumentException("Expecting a positive or zero number for " + name);
    }
  }
1106615
public String ordinalize(int number) {
        String numberStr = Integer.toString(number);
        if (11 <= number && number <= 13) return numberStr + "th";
        int remainder = number % 10;
        if (remainder == 1) return numberStr + "st";
        if (remainder == 2) return numberStr + "nd";
        if (remainder == 3) return numberStr + "rd";
        return numberStr + "th";
    }
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;
    }
  }
523821
public <N extends Number & Comparable<?>> NumberExpression<T> subtract(Expression<N> right) {
        return Expressions.numberOperation(getType(), Ops.SUB, mixin, right);
    }
1187291
public String normalizeNumber(final String number) {
        try {
            final BigDecimal normalizedNumber = parseNumber(new NumberBuffer(
                    number));
            if (normalizedNumber == null) {
                return number;
            }
            return normalizedNumber.toBigIntegerExact().toString();

        } catch (NumberFormatException | ArithmeticException e) {
            // Return the source number in case of error, i.e. malformed input
            return number;
        }
    }
143660
@NullSafe
  public static int sum(final int... numbers) {
    int sum = 0;

    if (numbers != null) {
      for (int number : numbers) {
        sum += number;
      }
    }

    return sum;
  }
332450
public static boolean isValidDouble(String number) {
        boolean valid = false;
        if (isDouble(number) && isPositive(Double.parseDouble(number))) {
            valid = true;
        }
        return valid;
    }
513715
public NumberExpression<Integer> ordinal() {
        if (ordinal == null) {
            ordinal = Expressions.numberOperation(Integer.class, Ops.ORDINAL, mixin);
        }
        return ordinal;
    }
48326
function internalNumber( $number )
    {
        if ( preg_match( '/^(['.$this->PositiveSymbol.']|['.$this->NegativeSymbol.'])?([0-9]*|[0-9]{1,3}(['.$this->ThousandsSeparator.'][0-9]{3,3})*)(['.$this->DecimalSymbol.'][0-9]+)?$/', trim( $number ) ) )
        {
            $number = str_replace( ' ', '', $number );
            if ( $this->PositiveSymbol )
                $number = str_replace( $this->PositiveSymbol, '', $number );
            $number = str_replace( $this->NegativeSymbol, '-', $number );
            $number = str_replace( $this->ThousandsSeparator, '', $number );
            $number = str_replace( $this->DecimalSymbol, '.', $number );
        }
        return $number;
    }
1060922
private static Object toNumber( String value)
    {
    Object number;

    try
      {
      number = toExternalNumber( new BigDecimal( value));
      }
    catch( Exception e)
      {
      number = null;
      }

    return number;
    }
1136928
def _handle_negatives(numbers):
    
    min_number = min(filter(lambda x : type(x)==int,numbers))
    if min_number < 0:
        return [x+abs(min_number) if type(x)==int else x for x in numbers]
    else:
        return numbers