term : SUB factor
             | ADD factor
13209
def p_factor_unary_operators(self, p):
        

        p[0] = p[2]
        if p[1] == '-':
            p[0] = Instruction('-x', context={'x': p[0]})
910743
def sub(self, inplace=False, **kwargs):
        """"""
        filter_ = self.where(**kwargs)
        return self.subindex(filter_, inplace)
25614
public void addConstantFactor(String factorName, Factor factor) {
    constantFactors.add(ReplicatedFactor.fromFactor(factor));
    constantFactorNames.add(factorName);
  }
750131
def index(self, sub, *args):
        
        pos = self.find(sub, *args)
        if pos == -1:
            raise ValueError('substring not found')
        return pos
62822
def subproduct(self, ext):
        
        fname, fpath = self.subproductPath(ext)
        return fname, fpath, self.subproductUpToDate(fpath)
569946
function factorize(n, addFactor) {
    let remainder = 0;
    let i = 0;
    let multiplier = FOUND_PRIMES[i];

    //go through prime multipliers
    while (multiplier <= n) {
        do {
            remainder = n % multiplier;
            if (!remainder) {
                n /= multiplier;
                addFactor(multiplier);
            }
        } while (!remainder);
        multiplier = FOUND_PRIMES[++i];
    }
}
772778
def sub_step(value, type = :next)
      val = value.abs
      type = :prev if value < 0
      command(type == :next ? "sub_step #{val}" : "sub_step #{-val}" )
    end
469901
def _subtitlesAdded(self, path, subNos):
        """"""
        def action(current, count, model, row):
            _setSubNo(current + count, model, row)

        def count(current, nos):
            ret = 0
            for no in nos:
                if current >= no:
                    ret += 1
                    # consider: current = 0, nos = [0, 1, 2, 3]
                    # in that case, current should be prepended by all nos
                    current += 1
            return ret

        self._changeSubNos(path, subNos, count, action)
608177
function SumFactor(sum_variable, terms_variables, coeffs) {
      if (len(terms_variables) !== len(coeffs)) {
        throw new Error("assert error");
      }
      this.sum = sum_variable;
      this.terms = terms_variables;
      this.coeffs = coeffs;
      SumFactor.__super__.constructor.call(this, [sum_variable].concat(terms_variables));
    }
1281836
def add_sub_category(self, label):
        
        category = Category(label, self)
        self._sub_categories.append(category)
        return category
73970
public void sub(IMatrix b, IMatrix result) {
        if ((b == null) || (rows != b.rows) || (columns != b.columns)) return;

        if ((result.rows != rows) || (result.columns != columns)) result.reshape(rows, columns);

        int i, j;
        for (i = 0; i < rows; i++)
            for (j = 0; j < columns; j++) {
                result.realmatrix[i][j] = realmatrix[i][j] - b.realmatrix[i][j];
                result.imagmatrix[i][j] = imagmatrix[i][j] - b.imagmatrix[i][j];
            }
    }
1022770
def sub(self, *args, **kwargs):
        
        return self._apply(operator.sub, *args, **kwargs)
322339
private void addSubType(FunctionType subType) {
    if (subTypes == null) {
      subTypes = new ArrayList<>();
    }
    subTypes.add(subType);
  }
1352315
def add_subtrack(self, subtrack):
        
        self.add_child(subtrack)
        self.subtracks.append(subtrack)
44193
Expr addSub() {
		Expr expr = mulDivMod();
		for (Tok tok=peek(); tok.sym==Sym.ADD || tok.sym==Sym.SUB; tok=peek()) {
			move();
			expr = new Arith(tok.sym, expr, mulDivMod(), location);
		}
		return expr;
	}
866203
public void addUnreplicatedFactor(String factorName, Factor factor, VariableNumMap vars) {
    plateFactors.add(new ReplicatedFactor(factor, new WrapperVariablePattern(vars)));
    plateFactorNames.add(factorName);
  }
544975
def sub!(pat, rep)
      each_with_index { |fn, i| self[i] = fn.sub(pat, rep) }
      self
    end