Skip to content

Commit

Permalink
Update base/math.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Neven Sajko <[email protected]>
  • Loading branch information
stevengj and nsajko committed Jan 2, 2025
1 parent 1d42f4e commit 05cfd26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ evalpoly(x, p::AbstractVector) = _evalpoly(x, p)
function _evalpoly(x, p)
Base.require_one_based_indexing(p)
N = length(p)
@inbounds p0 = N == 0 ? reduce_empty_iter(+, p) : p[N]
p0 = iszero(N) ? reduce_empty_iter(+, p) : @inbounds p[N]
s = oftype(one(x) * p0, p0)
for i in N-1:-1:1
s = muladd(x, s, @inbounds p[i])
Expand Down

0 comments on commit 05cfd26

Please sign in to comment.