Skip to content

Commit ff710ff

Browse files
author
Katharine Hyatt
committed
Not sure about this
1 parent 21dc3a1 commit ff710ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/implementations/svd.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ function svd_trunc!(A::AbstractMatrix, USVᴴ, alg::TruncatedAlgorithm{<:GPU_Ran
411411
normA = norm(A)
412412
# equivalent to sqrt(normA^2 - normS^2)
413413
# but may be more accurate
414-
ϵ = sqrt((normA + normS) * (normA - normS))
414+
ϵ = sqrt((normA + normS) * abs(normA - normS))
415415
return Utr, Str, Vᴴtr, ϵ
416416
end
417417

0 commit comments

Comments
 (0)