Sub computes the difference between the given variables. When more than two variables are provided, the difference is computed as i1 - Σ(i2...).
(i1, i2 frontend.Variable, in ...frontend.Variable)
| 47 | // Sub computes the difference between the given variables. |
| 48 | // When more than two variables are provided, the difference is computed as i1 - Σ(i2...). |
| 49 | func (builder *builder) Sub(i1, i2 frontend.Variable, in ...frontend.Variable) frontend.Variable { |
| 50 | vars := builder.toVariableIds(append([]frontend.Variable{i1, i2}, in...)...) |
| 51 | return builder.add(vars, true) |
| 52 | } |
| 53 | |
| 54 | // returns res = Σ(vars) or res = vars[0] - Σ(vars[1:]) if sub == true. |
| 55 | func (builder *builder) add(vars []int, sub bool) frontend.Variable { |
no test coverage detected