Skip to content

Commit ca74be7

Browse files
committed
Minor improvements in power
1 parent 0203652 commit ca74be7

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

src/power.jl

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,7 @@ end
350350
return nothing
351351
end
352352
# The recursion formula
353-
if l0+kprime a.order
354-
# @inbounds c[k] = r * kprime * c[lnull] * a[l0+kprime]
355-
@inbounds for j in eachindex(a[l0])
356-
mul_scalar!(c[k], r * kprime, c[lnull], a[l0+kprime], j)
357-
end
358-
end
359-
for i = 1:k-lnull-1
353+
for i = 0:k-lnull-1
360354
((i+lnull) > a.order || (l0+kprime-i > a.order)) && continue
361355
rr = r*(kprime-i) - i
362356
# @inbounds c[k] += rr * c[i+lnull] * a[l0+kprime-i]
@@ -829,16 +823,7 @@ end
829823
subst!(c[k], c[k], aux, j)
830824
end
831825
end
832-
# imin ≤ imax && ( @inbounds c[k] -= 2 * c[imin] * c[k+k0-imin] )
833-
if imin imax
834-
# c[k] -= 2 * c[imin] * c[k+k0-imin]
835-
@inbounds for j in eachindex(c[k])
836-
zero!(aux, j)
837-
mul_scalar!(aux, 2, c[imin], c[k+k0-imin], j)
838-
subst!(c[k], c[k], aux, j)
839-
end
840-
end
841-
@inbounds for i = imin+1:imax
826+
@inbounds for i = imin:imax
842827
# c[k] -= 2 * c[i] * c[k+k0-i]
843828
for j in eachindex(c[k])
844829
zero!(aux, j)

0 commit comments

Comments
 (0)