File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change 462
462
# function, which would either need to be lifted from SpecialFunctions.jl or
463
463
# re-implemented. And with an order of, like, 10, this seems to be pretty
464
464
# 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}
488
466
fv = 4 * v* v
489
467
fvp1 = 4 * (v+ one (v))^ 2
490
468
_z = x
You can’t perform that action at this time.
0 commit comments