Skip to content

Commit 257af03

Browse files
authored
close #596 (#597)
* close #596
1 parent 41da4d0 commit 257af03

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
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 = "4.0.16"
5+
version = "4.0.17"
66

77
[deps]
88
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

_typos.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[default.extend-words]
2-
Pn = "Pn"
2+
Pn = "Pn"
3+
zerod = "zerod"

src/common.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,8 +1347,11 @@ function Base.isapprox(p1::AbstractPolynomial{T,X},
13471347
end
13481348
end
13491349

1350-
Base.isapprox(p1::AbstractPolynomial{T}, n::S;kwargs...) where {S,T} = isapprox(p1, n*one(p1))
1351-
Base.isapprox(n::S,p1::AbstractPolynomial{T}; kwargs...) where {S,T} = isapprox(p1, n; kwargs...)
1350+
Base.isapprox(p1::AbstractPolynomial{T}, n::S;kwargs...) where {S,T} =
1351+
isapprox(promote(p1, n)...; kwargs...)
1352+
# isapprox(p1, n*one(p1))
1353+
Base.isapprox(n::S,p1::AbstractPolynomial{T}; kwargs...) where {S,T} =
1354+
isapprox(p1, n; kwargs...)
13521355

13531356
Base.isapprox(::AbstractPolynomial{T}, ::Missing, args...; kwargs...) where T = missing
13541357
Base.isapprox(::Missing, ::AbstractPolynomial{T}, args...; kwargs...) where T = missing

test/rational-functions.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ using LinearAlgebra
9191
@test degree(numerator(q^2 // q)) == 0
9292
@test degree(denominator(q^2 // q)) == 1
9393

94+
# issue 596
95+
p = Polynomial([0,1])
96+
r = p//1
97+
@test (p//1) p
9498
end
9599

96100
@testset "zeros, poles, residues" begin

0 commit comments

Comments
 (0)