Skip to content

Commit e9e4166

Browse files
RomeoVChrisRackauckas
authored andcommitted
Hardcode get_tolerance for Float64 for trimming
This is definitely a bug somewhere, but without this `@report_opt` or `@report_trim` reports errors here.
1 parent bf91c11 commit e9e4166

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/NonlinearSolveBase/src/common_defaults.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ function get_tolerance(::Nothing, ::Type{T}) where {T}
3939
η = real(oneunit(T)) * (eps(real(one(T)))^(4 // 5))
4040
return get_tolerance(η, T)
4141
end
42+
function get_tolerance(::Nothing, ::Type{Float64})
43+
# trimming hangs up on the literal_pow to rational numbers here
44+
η = real(oneunit(Float64)) * 3e-13
45+
return get_tolerance(η, Float64)
46+
end
4247

4348
get_tolerance(_, η, ::Type{T}) where {T} = get_tolerance(η, T)
4449
function get_tolerance(::Union{StaticArray, Number}, ::Nothing, ::Type{T}) where {T}

0 commit comments

Comments
 (0)