We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71de923 commit 3252399Copy full SHA for 3252399
src/besselk.jl
@@ -279,7 +279,6 @@ end
279
# arXiv preprint arXiv:2201.00090 (2022).
280
function besselk_power_series(v, x::T) where T
281
MaxIter = 1000
282
- # precompute a handful of things:
283
xd2 = x / 2
284
xd22 = xd2 * xd2
285
half = one(T) / 2
@@ -291,10 +290,10 @@ function besselk_power_series(v, x::T) where T
291
290
# use the gamma function a couple times to start:
292
gam_v = gamma(v)
293
xp1 = abs(v) + one(T)
294
- gam_nv = π / sinpi(xp1) / _gamma(xp1)
+ gam_nv = π / (sinpi(xp1) * _gamma(xp1))
295
gam_1mv = -gam_nv*v # == gamma(one(T)-v)
296
gam_1mnv = gam_v*v # == gamma(one(T)+v)
297
-
+
298
# One final re-compression of a few things:
299
_t1 = gam_v*xd2_nv*gam_1mv
300
_t2 = gam_nv*xd2_v*gam_1mnv
0 commit comments