diff --git a/src/auxiliary/math.jl b/src/auxiliary/math.jl index 3b87c152534..5e5c326edc2 100644 --- a/src/auxiliary/math.jl +++ b/src/auxiliary/math.jl @@ -8,7 +8,8 @@ # AbstractFloat clashes with ForwardDiff.Dual sqrt_(x::T) where {T <: Real} = x < zero(x) ? oftype(x, NaN) : Base.sqrt(x) # < 0 suffices since log(0) = -Inf -log_(x::T) where {T <: AbstractFloat} = x < zero(x) ? oftype(x, NaN) : Base.log(x) +# `AbstractFloat` clashes with `ForwardDiff.Dual` => use `Real` +log_(x::T) where {T <: Real} = x < zero(x) ? oftype(x, NaN) : Base.log(x) """ ln_mean(x, y)