Skip to content

Commit

Permalink
fix for positive v
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith authored Nov 7, 2022
1 parent 52587f5 commit 9b06a72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/besselk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ function besselk_power_series(v, x::ComplexOrReal{T}) where T
# use the reflection identify to calculate gamma(-v)
# use relation gamma(v)*v = gamma(v+1) to avoid two gamma calls
gam_v = gamma(v)
gam_nv = π / (sinpi(v) * gam_v * v)
gam_nv = π / (sinpi(-abs(v)) * gam_v * v)
gam_1mv = -gam_nv * v
gam_1mnv = gam_v * v

Expand Down

0 comments on commit 9b06a72

Please sign in to comment.