Skip to content

Commit 1a20574

Browse files
authored
check for exact coefficients; close #600 (#601)
* check for exact coefficients * typo * test locally first * typo
1 parent 12c11ef commit 1a20574

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
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.18"
5+
version = "4.0.19"
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,3 +1,4 @@
11
[default.extend-words]
22
Pn = "Pn"
3-
zerod = "zerod"
3+
zerod = "zerod"
4+
Comput = "Comput"

src/polynomials/standard-basis/standard-basis.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,14 @@ function Base.divrem(num::P, den::Q) where {B<:StandardBasis,
196196
m = degree(den)
197197

198198
m == -1 && throw(DivideError())
199-
if m == 0 && den[0] 0 throw(DivideError()) end
199+
if m == 0
200+
if hasmethod(eps, (S,)) # some way to check if using ≈ or == is appropriate
201+
den[0] 0 && throw(DivideError())
202+
else
203+
den[0] == 0 && throw(DivideError())
204+
end
205+
end
206+
200207

201208
R = eltype(one(T)/one(S))
202209

0 commit comments

Comments
 (0)