Skip to content

Commit

Permalink
Merge pull request #160 from jverzani/issue_159
Browse files Browse the repository at this point in the history
close issue 159
  • Loading branch information
jverzani authored Jan 18, 2019
2 parents 12d611f + 2bb0ccf commit 0f85564
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Polynomials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ function _polyder(p::Poly{T}, order::Int=1) where {T}
n = length(p)
a2 = Vector{T}(undef, n-order)
for i = order:n-1
a2[i-order+1] = p[i] * prod((i-order+1):i)
a2[i-order+1] = reduce(*, (i-order+1):i, init=p[i])
end

return Poly(a2, p.var)
Expand Down
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -391,3 +391,5 @@ xx = Real[20.0, 30.0, 40.0]
yy = Real[15.7696, 21.4851, 28.2463]
polyfit(xx,yy,2)

## Issue with overflow and polyder Issue #159
@test !iszero(polyder(Poly(BigInt[0, 1])^100, 100))

0 comments on commit 0f85564

Please sign in to comment.