subtract method

ModulusPoly subtract(
  1. ModulusPoly other
)

Implementation

ModulusPoly subtract(ModulusPoly other) {
  if (_field != other._field) {
    throw ArgumentError('ModulusPolys do not have same ModulusGF field');
  }
  if (other.isZero) {
    return this;
  }
  return add(other.negative());
}