JuliaMath / JuliaMath/SpecialFunctions.jl

Gamma function should return Inf at -1, -2, -3......

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

Description

at -1, -2, -3... gamma should return Inf like gamma(0)

julia> gamma(0)
Inf

julia> gamma(-1.0)
ERROR: DomainError with -1.0:
NaN result for non-NaN input.
Stacktrace:
[1] nan_dom_err at ./math.jl:339 [inlined]
[2] gamma(::Float64) at /Users/zhengjinwei/.julia/packages/SpecialFunctions/fvheQ/src/gamma.jl:558
[3] top-level scope at none:0

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.