From ea9d3948a305e2ba45a34c504e9998a44236dcf2 Mon Sep 17 00:00:00 2001 From: Daniel Doehring Date: Mon, 18 Dec 2023 16:37:21 +0100 Subject: [PATCH] Update src/auxiliary/math.jl --- src/auxiliary/math.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)