Skip to content

Commit

Permalink
Use muladd in complex evalpoly (#35562)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustt198 authored Apr 23, 2020
1 parent 407caee commit eaa2c58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function evalpoly(z::Complex, p::Tuple)
ai = Symbol("a", i)
push!(as, :($ai = $a))
a = :(muladd(r, $ai, $b))
b = :(p[$i] - s * $ai)
b = :(muladd(-s, $ai, p[$i]))
end
ai = :a0
push!(as, :($ai = $a))
Expand Down Expand Up @@ -186,7 +186,7 @@ function _evalpoly(z::Complex, p)
for i in N-2:-1:1
ai = a
a = muladd(r, ai, b)
b = p[i] - s * ai
b = muladd(-s, ai, p[i])
end
ai = a
muladd(ai, z, b)
Expand Down

0 comments on commit eaa2c58

Please sign in to comment.