This is the mail archive of the
gsl-discuss@sourceware.cygnus.com
mailing list for the GSL project.
SVD in linalg_simple
- To: GSL discussion list <gsl-discuss at sourceware dot cygnus dot com>
- Subject: SVD in linalg_simple
- From: James Theiler <jt at lanl dot gov>
- Date: Mon, 18 Oct 1999 00:48:07 -0600 (MDT)
hi,
i was trying to use the SVD routine in linalg/linalg_simple.c,
and it was producing singular values that were saturating at
about 10^-6, even though the true values were much smaller than
that. i was able to "fix" the problem by replacing
GSL_DBL_EPSILON with GSL_DBL_MIN, but i am suspicious of this
solution. perhaps the true test should be GSL_DBL_EPSILON times
some scale factor? despite the fact that SVD always seems a
little magical to me, and despite the likelihood that it will
break some other case, i've gone ahead and cvs commit'd the
change. my own testing code, i must confess, is too convoluted
to include here, but the test i did was a 10x10 Hilbert matrix:
A[i][j] = 1/(i+j+2), i=0..9, j=0..9
Using GSL_DBL_EPSILON:
1.28766
0.162737
0.0132489
0.000798034
2.25543e-05
6.56413e-06
1.1234e-05
1.47914e-05
1.57544e-05
1.22727e-05
Using GSL_DBL_MIN:
1.28766
0.162737
0.0132489
0.000798037
3.58996e-05
1.19264e-06
2.8445e-08
4.61135e-10
4.55323e-12
2.06677e-14
Using a competitor's product:
1.28766
0.162737
0.0132489
0.000798037
3.58996e-05
1.19264e-06
2.8445e-08
4.61135e-10
4.55322e-12
2.06676e-14
, but the i
edee
what I imagine should be much smaller
( was failing to find eigenvalues less than 10^-6 for a matrix
---------------------------------------------
James Theiler jt@lanl.gov
MS-D436, NIS-2, LANL tel: 505/665-5682
Los Alamos, NM 87545 fax: 505/665-4414
----- Space and Remote Sensing Sciences -----