diff --git a/src/differentiation.jl b/src/differentiation.jl index 5c63b8e9..58425ad8 100644 --- a/src/differentiation.jl +++ b/src/differentiation.jl @@ -23,8 +23,9 @@ struct FiniteDifference{T <: AbstractFloat} <: DifferentiationMethod ε::T end -# If ε not specified, default to 1e-6 -FiniteDifference() = FiniteDifference(1e-6) +# Default constructors +FiniteDifference{T}() where {T <: AbstractFloat} = FiniteDifference{T}(T(1e-6)) +FiniteDifference() = FiniteDifference{Float64}() """ AutoEnzyme()