Skip to content

Commit d2a80a6

Browse files
corbett5dkarrasch
authored andcommitted
Change default QR tolerance to match SPQR (#557)
SPQR uses just the double precision epsilon even for Float32. https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/131471310ef0600b231b8fa7c10a55c3f70afbd9/SPQR/Source/spqr_tol.cpp#L29C6-L30C57
1 parent 9b8cd14 commit d2a80a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/solvers/spqr.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Matrix{T}(Q::QRSparseQ) where {T} = lmul!(Q, Matrix{T}(I, size(Q, 1), min(size(Q
146146

147147
# From SPQR manual p. 6
148148
_default_tol(A::AbstractSparseMatrixCSC) =
149-
20*sum(size(A))*eps(real(eltype(A)))*maximum(norm(view(A, :, i)) for i in 1:size(A, 2))
149+
20*sum(size(A))*eps()*maximum(norm(view(A, :, i)) for i in 1:size(A, 2))
150150

151151
"""
152152
qr(A::SparseMatrixCSC; tol=_default_tol(A), ordering=ORDERING_DEFAULT) -> QRSparse

0 commit comments

Comments
 (0)