Skip to content

Commit

Permalink
Add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion authored Jun 4, 2021
1 parent 9e22b30 commit 9e7461f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/beta_inc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Computes ``log(\\Gamma(b)/\\Gamma(a+b))`` when b >= 8
"""
loggammadiv(a::Number, b::Number) = _loggammadiv(promote(float(a), float(b))...)

_loggammadiv(a::Number, b::Number) = loggamma(b) - loggamma(a + b)
# TODO: Add a proper implementation
_loggammadiv(a::Number, b::Number) = loggamma(b) - loggamma(a + b) # handle e.g. BigFloat (used by `logabsbeta`)
_loggammadiv(a::T, b::T) where {T<:Base.IEEEFloat} = T(_loggammadiv(Float64(a), Float64(b))) # handle Float16, Float32
function _loggammadiv(a::Float64, b::Float64)
@assert b >= 8
Expand Down

0 comments on commit 9e7461f

Please sign in to comment.