Changed zero polynomial resulting from scaling to have one coefficient

This commit is contained in:
Stefan Müller 2024-05-23 22:11:22 +02:00
parent 37309d2817
commit aef4f28f46
1 changed files with 4 additions and 2 deletions

View File

@ -88,8 +88,10 @@ begin
factor := factor * AScaleFactor; factor := factor * AScaleFactor;
end; end;
end end
else else begin
SetLength(Result.FCoefficients, 0); SetLength(Result.FCoefficients, 1);
Result.FCoefficients[0] := TBigInt.Zero;
end;
end; end;
function TBigIntPolynomial.IsEqualTo(const AOther: TBigIntPolynomial): Boolean; function TBigIntPolynomial.IsEqualTo(const AOther: TBigIntPolynomial): Boolean;