Returns the positive value to subtract from the total.
359900
def value(self):
      """"""
      originalPrice = self.lineItem.totalPrice
      if self.flatRate == 0:
        return originalPrice * self.percent
      return self.flatRate
723482
public double totalCount() {
    if (depth() == 1) {
      return total; // I think this one is always OK.  Not very principled here, though.
    } else {
      double result = 0.0;
      for (K o: topLevelKeySet()) {
        result += conditionalizeOnce(o).totalCount();
      }
      return result;
    }
  }
394703
@Override
  public ByteAmount minus(ResourceMeasure<Long> other) {
    checkArgument(Long.MIN_VALUE + other.value <= value,
        String.format("Subtracting %s from %s would overshoot Long.MIN_LONG", other, this));
    return ByteAmount.fromBytes(value - other.value);
  }
714175
def subtract(self, expr, simplify):
        
        args = self.args
        if expr in self.args:
            args = list(self.args)
            args.remove(expr)
        elif isinstance(expr, self.__class__):
            if all(arg in self.args for arg in expr.args):
                args = tuple(arg for arg in self.args if arg not in expr)
        if len(args) == 0:
            return None
        if len(args) == 1:
            return args[0]

        newexpr = self.__class__(*args)
        if simplify:
            newexpr = newexpr.simplify()
        return newexpr
1278189
def positiveint(value):
    
    i = int(not_empty(value))
    if i < 0:
        raise ValueError('integer %d < 0' % i)
    return i
335645
public BigDecimal getTotal() {

    if (total == null) {
      return available.add(frozen).subtract(borrowed).add(loaned).add(withdrawing).add(depositing);
    } else {
      return total;
    }
  }
529045
private Expression plusMinusOp(Data data) throws TemplateException {
	Expression expr = modOp(data);

	while (!data.srcCode.isLast()) {

	    // Plus Operation
	    if (data.srcCode.forwardIfCurrent('+')) expr = _plusMinusOp(data, expr, Factory.OP_DBL_PLUS);
	    // Minus Operation
	    else if (data.srcCode.forwardIfCurrent('-')) expr = _plusMinusOp(data, expr, Factory.OP_DBL_MINUS);
	    else break;
	}
	return expr;
    }
1013821
public Rational subtract(Rational val) {
        Rational val2 = val.negate();
        return (add(val2));
    }
808347
def subtract_afromb(*inputs, **kwargs):
    

    try:
        value_a = inputs[0].pop()
        value_b = inputs[1].pop()

        return [IOTileReading(0, 0, value_b.value - value_a.value)]
    except StreamEmptyError:
        return []
210484
public PackedDecimal subtract(Bruch operand) {
        AbstractNumber result = toBruch().subtract(operand);
        return PackedDecimal.valueOf(result);
    }
796972
public function subtract($value)
    {
        if (!$value instanceof self) {
            $value = new self($value, $this->getScale(), false);
        }

        $newValue = bcsub($this->getValue(), $value->getValue(), $this->getScale());

        return $this->assignValue($newValue);
    }
453477
def positive(value, argument='argument'):
    
    value = _get_integer(value)
    if value < 1:
        error = ('Invalid {arg}: {value}. {arg} must be a positive '
                 'integer'.format(arg=argument, value=value))
        raise ValueError(error)
    return value
798405
def SubtractFromBalance(self, assetId, fixed8_val):
        
        found = False
        for key, balance in self.Balances.items():
            if key == assetId:
                self.Balances[assetId] = self.Balances[assetId] - fixed8_val
                found = True
        if not found:
            self.Balances[assetId] = fixed8_val * Fixed8(-1)
718184
def nonnegative_float(s):
    
    err_msg = "must be either positive or zero, not %r" % s
    try:
        value = float(s)
    except ValueError:
        raise argparse.ArgumentTypeError(err_msg)
    if value < 0:
        raise argparse.ArgumentTypeError(err_msg)
    return value
1022524
public double count(T obj, double count) {
        if (count <= 0)
            throw new IllegalArgumentException("Count must be positive: " + count);
        double oldCount = counts.get(obj);
        double newCount = count + oldCount;
        counts.put(obj, newCount);
        sum += count;
        return newCount;
    }
589498
def subtract(self, number1, number2):
        """"""
        return self._format_result(int(number1) - int(number2))
638382
def sum(self, only_valid=True) -> ErrorValue:
        """"""
        if not only_valid:
            mask = 1
        else:
            mask = self.mask
        return ErrorValue((self.intensity * mask).sum(),
                          ((self.error * mask) ** 2).sum() ** 0.5)