Skip to content

Commit 9b06a72

Browse files
authored
fix for positive v
1 parent 52587f5 commit 9b06a72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/besselk.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ function besselk_power_series(v, x::ComplexOrReal{T}) where T
453453
# use the reflection identify to calculate gamma(-v)
454454
# use relation gamma(v)*v = gamma(v+1) to avoid two gamma calls
455455
gam_v = gamma(v)
456-
gam_nv = π / (sinpi(v) * gam_v * v)
456+
gam_nv = π / (sinpi(-abs(v)) * gam_v * v)
457457
gam_1mv = -gam_nv * v
458458
gam_1mnv = gam_v * v
459459

0 commit comments

Comments
 (0)