Skip to content

Commit

Permalink
define dot fallback error (#563)
Browse files Browse the repository at this point in the history
* define dot fallback error

* add file to clear typos
  • Loading branch information
jverzani committed Apr 6, 2024
1 parent df35832 commit c392ea8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 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.7"
version = "4.0.8"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
2 changes: 2 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[default.extend-words]
Pn = "Pn"
4 changes: 4 additions & 0 deletions src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions src/polynomials/ngcd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down

2 comments on commit c392ea8

@jverzani
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/104396

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v4.0.8 -m "<description of version>" c392ea8f50a1d3403bed5e6bf2d646a3cac81760
git push origin v4.0.8

Also, note the warning: Version 4.0.8 skips over 4.0.7
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.