Skip to content

Hardcode get_tolerance for Float64 for trimming #648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/NonlinearSolveBase/src/common_defaults.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ function get_tolerance(::Nothing, ::Type{T}) where {T}
η = real(oneunit(T)) * (eps(real(one(T)))^(4 // 5))
return get_tolerance(η, T)
end
function get_tolerance(::Nothing, ::Type{Float64})
# trimming hangs up on the literal_pow to rational numbers here
η = real(oneunit(Float64)) * 3e-13
return get_tolerance(η, Float64)
end

get_tolerance(_, η, ::Type{T}) where {T} = get_tolerance(η, T)
function get_tolerance(::Union{StaticArray, Number}, ::Nothing, ::Type{T}) where {T}
Expand Down
Loading