From aef4f28f46a1b94651a3ec8dd55ac6ead8dc95ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Thu, 23 May 2024 22:11:22 +0200 Subject: [PATCH] Changed zero polynomial resulting from scaling to have one coefficient --- UPolynomial.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/UPolynomial.pas b/UPolynomial.pas index aa3467d..c4fd23b 100644 --- a/UPolynomial.pas +++ b/UPolynomial.pas @@ -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;