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;
end;
end
else
SetLength(Result.FCoefficients, 0);
else begin
SetLength(Result.FCoefficients, 1);
Result.FCoefficients[0] := TBigInt.Zero;
end;
end;
function TBigIntPolynomial.IsEqualTo(const AOther: TBigIntPolynomial): Boolean;