Closed
Description
Consider the definition of xlogx
:
xlogx(x::Real) = x > zero(x) ? x * log(x) : zero(log(x))
Then derivative(xlogx, 0.)
returns 0.
. The correct answer is -Inf
.
I understand this is due to the singular branch at x=0
, and I'm not even sure if there is any way that ForwardDiff
can handle this.
Metadata
Metadata
Assignees
Labels
No labels