From dbaa0b8a13f4ed1fae6c940b95df07911fc483e5 Mon Sep 17 00:00:00 2001 From: Katharine Hyatt Date: Tue, 1 Dec 2026 01:59:38 -0500 Subject: [PATCH] Tighten default gauge rtol to eps^(3/4) --- src/common/gauge.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/gauge.jl b/src/common/gauge.jl index d2d0c690d..e3eee3089 100644 --- a/src/common/gauge.jl +++ b/src/common/gauge.jl @@ -14,10 +14,10 @@ _argmaxabs(x) = reduce(_largest, x; init = zero(eltype(x))) _largest(x::Real, y::Real) = abs(x) < abs(y) ? y : x _largest(x::Complex, y::Complex) = abs2(x) < abs2(y) ? y : x -default_gauge_rtol(V) = sqrt(eps(real(float(eltype(V))))) +default_gauge_rtol(V) = eps(real(float(eltype(V))))^(3 // 4) """ - gauge_index(V; dims = 1, rtol = sqrt(eps(real(eltype(V))))) + gauge_index(V; dims = 1, rtol = eps(real(eltype(V)))^(3 // 4)) Indices of the entries of `V` used to fix the gauge along dimension `dims`: for every slice, the first entry whose magnitude is at least `(1 - rtol)` times the largest magnitude in that slice.