gcd method
- BinaryPolynomial other
Returns the greatest common divisor of this polynomial and other.
Implementation
BinaryPolynomial gcd(BinaryPolynomial other) {
var a = this;
var b = other;
while (!b.isZero) {
final remainder = a % b;
a = b;
b = remainder;
}
return a;
}