Skip to content

Commit 71de923

Browse files
committed
rm extra assignment
1 parent 6863aeb commit 71de923

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/besselk.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,21 +294,21 @@ function besselk_power_series(v, x::T) where T
294294
gam_nv = π / sinpi(xp1) / _gamma(xp1)
295295
gam_1mv = -gam_nv*v # == gamma(one(T)-v)
296296
gam_1mnv = gam_v*v # == gamma(one(T)+v)
297-
(gpv, gmv) = (gam_1mnv, gam_1mv)
297+
298298
# One final re-compression of a few things:
299299
_t1 = gam_v*xd2_nv*gam_1mv
300300
_t2 = gam_nv*xd2_v*gam_1mnv
301301
# A couple series-specific accumulators:
302302
(xd2_pow, fact_k, floatk, out) = (one(T), one(T), zero(T), zero(T))
303303
for _ in 0:MaxIter
304304
t1 = half*xd2_pow
305-
tmp = _t1/(gmv*fact_k)
306-
tmp += _t2/(gpv*fact_k)
305+
tmp = _t1/(gam_1mv*fact_k)
306+
tmp += _t2/(gam_1mnv*fact_k)
307307
term = t1*tmp
308308
out += term
309309
abs(term/out) < eps(T) && return out
310310
# Use the trick that gamma(1+k+1+v) == gamma(1+k+v)*(1+k+v) to skip gamma calls:
311-
(gpv, gmv) = (gpv*(one(T)+v+floatk), gmv*(one(T)-v+floatk))
311+
(gam_1mnv, gam_1mv) = (gam_1mnv*(one(T)+v+floatk), gam_1mv*(one(T)-v+floatk))
312312
xd2_pow *= xd22
313313
fact_k *= (floatk+1)
314314
floatk += one(T)

0 commit comments

Comments
 (0)