JuliaMath / JuliaMath/SpecialFunctions.jl

`besselk(x, 0im)` fails

Open
#382 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
381
Forks
113
Avg merge
1d 23h
Merged PRs (30d)
1

Description

`besselk(x, 0im)` should just return `T(Inf)` for any `x` but returns an `AmosException` instead.
Here is a MWE:
```julia
using SpecialFunctions
besselk(2, 0im)
ERROR: AmosException with id 1: input error.
Stacktrace:
[1] _besselk(nu::Float64, z::ComplexF64, kode::Int32)
@ SpecialFunctions ~/.julia/packages/SpecialFunctions/9pXme/src/bessel.jl:274
[2] besselk
@ ~/.julia/packages/SpecialFunctions/9pXme/src/bessel.jl:408 [inlined]
[3] besselk(nu::Int64, z::Complex{Int64})
@ SpecialFunctions ~/.julia/packages/SpecialFunctions/9pXme/src/bessel.jl:586
[4] top-level scope
@ REPL[14]:1
```

Error noted in https://github.com/JuliaStats/Distributions.jl/pull/1504

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.