Skip to content

Commit 05cfd26

Browse files
stevengjnsajko
andcommitted
Update base/math.jl
Co-authored-by: Neven Sajko <[email protected]>
1 parent 1d42f4e commit 05cfd26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/math.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ evalpoly(x, p::AbstractVector) = _evalpoly(x, p)
110110
function _evalpoly(x, p)
111111
Base.require_one_based_indexing(p)
112112
N = length(p)
113-
@inbounds p0 = N == 0 ? reduce_empty_iter(+, p) : p[N]
113+
p0 = iszero(N) ? reduce_empty_iter(+, p) : @inbounds p[N]
114114
s = oftype(one(x) * p0, p0)
115115
for i in N-1:-1:1
116116
s = muladd(x, s, @inbounds p[i])

0 commit comments

Comments
 (0)