From 9c0948029eeac368789f054d29ada45f2984ffbb Mon Sep 17 00:00:00 2001 From: oscarddssmith Date: Thu, 20 Jun 2024 14:57:49 -0400 Subject: [PATCH] make log_quasitriu always take at least one sqrt --- stdlib/LinearAlgebra/src/triangular.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/LinearAlgebra/src/triangular.jl b/stdlib/LinearAlgebra/src/triangular.jl index c45db3e90fab2..a1f80a13e2da5 100644 --- a/stdlib/LinearAlgebra/src/triangular.jl +++ b/stdlib/LinearAlgebra/src/triangular.jl @@ -1938,7 +1938,7 @@ function _find_params_log_quasitriu!(A) d = complex.(@view(A[diagind(A)])) dm1 = d .- 1 s = 0 - while norm(dm1, Inf) > theta[tmax] && s < maxsqrt + while s<1 || norm(dm1, Inf) > theta[tmax] && s < maxsqrt d .= sqrt.(d) dm1 .= d .- 1 s = s + 1