diff --git a/src/besseli.jl b/src/besseli.jl index 72ac052..714d0e1 100644 --- a/src/besseli.jl +++ b/src/besseli.jl @@ -160,9 +160,9 @@ end # """ - besselk(x::T) where T <: Union{Float32, Float64} + besseli(x::T) where T <: Union{Float32, Float64} -Modified Bessel function of the second kind of order nu, ``K_{nu}(x)``. +Modified Bessel function of the second kind of order nu, ``I_{nu}(x)``. """ function besseli(nu::Real, x::T) where T isinteger(nu) && return besseli(Int(nu), x) diff --git a/src/besselk.jl b/src/besselk.jl index 52be2c8..7a8caa5 100644 --- a/src/besselk.jl +++ b/src/besselk.jl @@ -402,7 +402,7 @@ function besselk_power_series(v, x::T) where T tmp *= inv(gam_1mv * gam_1mnv * fact_k) term = t1 * tmp out += term - abs(term / out) < eps(T) && return out + abs(term / out) < eps(T) && break (gam_1mnv, gam_1mv) = (gam_1mnv*(one(T) + v + k), gam_1mv*(one(T) - v + k)) xd2_pow *= zz fact_k *= k + one(T)