Skip to content

Commit 1269497

Browse files
committed
Revert "Update src/besselk.jl"
This reverts commit b72e80f.
1 parent b72e80f commit 1269497

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

src/besselk.jl

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -462,29 +462,7 @@ end
462462
# function, which would either need to be lifted from SpecialFunctions.jl or
463463
# re-implemented. And with an order of, like, 10, this seems to be pretty
464464
# accurate and still faster than the uniform asymptotic expansion.
465-
function _besselk_as_pair(v, x::T, order) where T
466-
fv = 4*v*v
467-
fvp1 = 4*(v+one(v))^2
468-
z = 8*x
469-
knu, knpu1 = one(T), one(T)
470-
ak_nu = fv - 1
471-
ak_nup1 = fvp1 - 1
472-
473-
for i in 1:order
474-
term_v = ak_nu / z
475-
term_vp1 = ak_nup1 / z
476-
knu += term_v
477-
knpu1 += term_vp1
478-
479-
a = muladd(2, i, one(T))^2
480-
z *= 8*x*(i + one(T))
481-
482-
ak_nu *= fv - a
483-
ak_nup1 *= fvp1 - a
484-
end
485-
coef = SQRT_PID2(T)*exp(-x)/sqrt(x)
486-
return coef*knu, coef*knpu1
487-
end
465+
function _besselk_as_pair(v, x::T, order) where{T}
488466
fv = 4*v*v
489467
fvp1 = 4*(v+one(v))^2
490468
_z = x

0 commit comments

Comments
 (0)