-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Description
Hi! I found ellipk
crashes when input is NaN
.
julia> ellipk(NaN)
ERROR: UndefVarError: `x` not defined in local scope
Suggestion: check for an assignment to a local variable that shadows a global of the same name.
Stacktrace:
[1] _ellipk(m::Float64)
@ SpecialFunctions ~/.julia/packages/SpecialFunctions/mf0qH/src/ellip.jl:57
[2] ellipk(m::Float64)
@ SpecialFunctions ~/.julia/packages/SpecialFunctions/mf0qH/src/ellip.jl:45
[3] top-level scope
@ REPL[14]:1
I guess it should either return NaN
or throw a DomainError
.
There is also an issue with -Inf
.
julia> ellipk(-Inf)
ERROR: UndefVarError: `t` not defined in local scope
Suggestion: check for an assignment to a local variable that shadows a global of the same name.
Stacktrace:
[1] _ellipk(m::Float64)
@ SpecialFunctions ~/.julia/packages/SpecialFunctions/mf0qH/src/ellip.jl:0
[2] ellipk(m::Float64)
@ SpecialFunctions ~/.julia/packages/SpecialFunctions/mf0qH/src/ellip.jl:45
[3] top-level scope
@ REPL[12]:1
I think it should return 0.
Metadata
Metadata
Assignees
Labels
No labels