diff --git a/Project.toml b/Project.toml index 3d75fe9c..225a0b7c 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.7" +version = "4.0.8" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 00000000..658ef090 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +Pn = "Pn" \ No newline at end of file diff --git a/src/common.jl b/src/common.jl index f53bee56..27fbf291 100644 --- a/src/common.jl +++ b/src/common.jl @@ -1310,3 +1310,7 @@ Base.isapprox(n::S,p1::AbstractPolynomial{T}; kwargs...) where {S,T} = isapprox( Base.isapprox(::AbstractPolynomial{T}, ::Missing, args...; kwargs...) where T = missing Base.isapprox(::Missing, ::AbstractPolynomial{T}, args...; kwargs...) where T = missing + +function LinearAlgebra.dot(::AbstractPolynomial, ::AbstractPolynomial, args...; kwargs...) + throw(ArgumentError("No generic `dot` method is defined for polynomials.")) +end diff --git a/src/polynomials/ngcd.jl b/src/polynomials/ngcd.jl index c9eb8999..0d3fd5e2 100644 --- a/src/polynomials/ngcd.jl +++ b/src/polynomials/ngcd.jl @@ -534,9 +534,9 @@ function refine_uvw!(u::P, v::P, w::P, ρ₁ = residual_error(p, q, uv, uw) iszero(ρ₁) && return (ρ₁, NaN) # storage - h, β = u, dot(u,u) # h = constant * u₀ is used + h, β = u, dot(u.coeffs,u.coeffs) # h = constant * u₀ is used A = JF(h, u, v, w) - Δfβ = Fmp(dot(h, u) - β, p, q, uv, uw) + Δfβ = Fmp(dot(h.coeffs, u.coeffs) - β, p, q, uv, uw) Δz = ones(T, length(u) + length(v) + length(w)) n = size(A, 2) R = UpperTriangular(Matrix{T}(undef, n, n)) @@ -568,7 +568,7 @@ function refine_uvw!(u::P, v::P, w::P, steps ≥ Maxᵢ && break # update A,b for next iteration JF!(A, h, u, v, w) - Fmp!(Δfβ, dot(h, u) - β, p, q, uv, uw) + Fmp!(Δfβ, dot(h.coeffs, u.coeffs) - β, p, q, uv, uw) else steps == 1 && copy!(R′, R) break