Skip to content

Commit

Permalink
close #590; use deepcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
jverzani committed Jan 28, 2025
1 parent 7d92869 commit d87a856
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/polynomials/ngcd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions test/StandardBasis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d87a856

Please sign in to comment.