Skip to content

Commit 9d51785

Browse files
authored
Ngcd bug (#329)
* add check for p == q * replace backend to use a polynomial type; not vectors * version bump
1 parent 0bafe29 commit 9d51785

File tree

4 files changed

+186
-138
lines changed

4 files changed

+186
-138
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "Polynomials"
22
uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
33
license = "MIT"
44
author = "JuliaMath"
5-
version = "2.0.3"
5+
version = "2.0.4"
66

77
[deps]
88
Intervals = "d8418881-c3e1-53bb-8760-2df7ec849ed5"

src/abstract.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ abstract type AbstractPolynomial{T,X} end
1818

1919
# convert `as` into polynomial of type P based on instance, inheriting variable
2020
# (and for LaurentPolynomial the offset)
21-
_convert(p::P, as) where {P <: AbstractPolynomial} = (P)(as, indeterminate(P))
21+
_convert(p::P, as) where {T,X,P <: AbstractPolynomial{T,X}} = (P)(as, X)
2222

2323
"""
2424
Polynomials.@register(name)

src/polynomials/multroot.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ function pejorative_manifold(p::Polynomials.StandardBasisPolynomial{T};
9999
u, v, w, θ′, κ = Polynomials.ngcd(p, derivative(p),
100100
atol=ρ*norm(p), satol = θ*norm(p),
101101
rtol = zT, srtol = zT)
102-
103102
zs = roots(v)
104103
nrts = length(zs)
105104
ls = ones(Int, nrts)
@@ -170,7 +169,6 @@ function pejorative_root(p, zs::Vector{S}, ls::Vector{Int};
170169

171170
evalJ!(J, zₖs, ls)
172171
evalG!(G, zₖs, ls)
173-
174172
Δₖ .= (W*J) \ (W*(view(G, 2:1+m) .- a)) # weighted least squares
175173

176174
δₖ₁ = norm(Δₖ, 2)

0 commit comments

Comments
 (0)