JuliaLinearAlgebra / IterativeSolvers.jl

Iterative algorithms for solving linear systems, eigensystems, and singular value problems
MIT License
394 stars 106 forks source link

svdl: results differ from those of LinearAlgebra.svd #278

Open severinson opened 3 years ago

severinson commented 3 years ago

I'm getting some surprising values from svdl (IterativeSolvers.jl 0.8.4). Anyone that knows what's going on here?

Random.seed!(123);
X = randn(10, 6);
Σ, L = svdl(X, vecs=:both);
F = svd(X);

Singular values computed by svdl

Σ.S
 6-element Array{Float64,1}:
 320.9211937151166
 314.34224845686225
 213.92773975361044
 209.19233874206984
 142.11384510704383
 139.89924384072287

Singular values computed by LinearAlgebra.svd

F.S
 6-element Array{Float64,1}:
 5.753436432294746
 4.414616158400172
 3.369985724208918
 1.707195384548486
 1.6125442621275017
 1.0507184615303307

Platform info

versioninfo()
Julia Version 1.5.1
Commit 697e782ab8 (2020-08-25 20:08 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD EPYC 7451 24-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, znver1)
Environment:
  JULIA_NUM_THREADS = 48