From 9b4af665eb7119e430e012a354ca6d706d917568 Mon Sep 17 00:00:00 2001 From: john verzani Date: Tue, 28 Jan 2025 15:23:28 -0500 Subject: [PATCH] close #590; use deepcopy (#591) --- Project.toml | 2 +- src/polynomials/ngcd.jl | 2 +- test/StandardBasis.jl | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index dc468a8f..2493809f 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "Polynomials" uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45" license = "MIT" author = "JuliaMath" -version = "4.0.13" +version = "4.0.14" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/src/polynomials/ngcd.jl b/src/polynomials/ngcd.jl index 0d3fd5e2..514b2736 100644 --- a/src/polynomials/ngcd.jl +++ b/src/polynomials/ngcd.jl @@ -540,7 +540,7 @@ function refine_uvw!(u::P, v::P, w::P, Δz = ones(T, length(u) + length(v) + length(w)) n = size(A, 2) R = UpperTriangular(Matrix{T}(undef, n, n)) - R′ = copy(R) + R′ = deepcopy(R) ũ, ṽ, w̃ = copy(u), copy(v), copy(w) steps = 0 diff --git a/test/StandardBasis.jl b/test/StandardBasis.jl index d809a0da..2c69bc73 100644 --- a/test/StandardBasis.jl +++ b/test/StandardBasis.jl @@ -1019,6 +1019,14 @@ end @test isempty(out.values) @test isempty(out.multiplicities) end + + ## past issues + + ## issue #590 + pb = BigInt[-1, 2, -1] + out = Polynomials.Multroot.multroot(Polynomials.Polynomial(pb)) + @test out.values ≈ [1.0] && out.multiplicities == [2] + end @testset "critical points" begin