Skip to content

Commit

Permalink
Remove custom poislogpdf for ForwardDiff.Dual (#160)
Browse files Browse the repository at this point in the history
* Fix ForwardDiff of poislogpdf at v of zero

* Improve poislogpdf with ForwardDiff

Co-authored-by: David Widmann <[email protected]>

* Remove custom poislogpdf for ForwardDiff.Dual

* Bump version

* Mark tests as broken

* Mark more tests as broken

* Tests only broken on Julia 1.3?

* Revert changes

Co-authored-by: David Widmann <[email protected]>
  • Loading branch information
oschulz and devmotion authored Apr 26, 2021
1 parent c463960 commit 12e2288
Showing 1 changed file with 0 additions and 10 deletions.
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

0 comments on commit 12e2288

Please sign in to comment.