Skip to content

Remove custom poislogpdf for ForwardDiff.Dual #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 26, 2021
10 changes: 0 additions & 10 deletions src/forwarddiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ function binomlogpdf(n::Int, p::ForwardDiff.Dual{T}, x::Int) where {T}
end


## Poisson

function poislogpdf(v::ForwardDiff.Dual{T}, x::Int) where {T}
FD = ForwardDiff.Dual{T}
val = ForwardDiff.value(v)
Δ = ForwardDiff.partials(v)
return FD(poislogpdf(val, x), Δ * (x/val - 1))
end


## Integer dual ##

function BetaBinomial(n::ForwardDiff.Dual{<:Any, <:Integer}, α::Real, β::Real; check_args = true)
Expand Down