This is the mail archive of the
gsl-discuss@sourceware.cygnus.com
mailing list for the GSL project.
Re: SVD in linalg_simple
- To: GSL discussion list <gsl-discuss at sourceware dot cygnus dot com>
- Subject: Re: SVD in linalg_simple
- From: Gerard Jungman <jungman at lanl dot gov>
- Date: Mon, 18 Oct 1999 16:05:13 -0600
- Organization: LANL T-8
- References: <Pine.LNX.4.10.9910180032160.26552-100000@yks.lanl.gov>
James Theiler wrote:
>
> 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?
Like all fudge factors, it's not clear what to do. GSL_DBL_MIN
doesn't make sense. I suppose it's main job is to avoid a division
by zero below, although that would strictly imply a singularity
anyway.
You can tell that it doesn't make sense as it stands since the test is
not formed as a dimensionless ratio, so you could have broken it with
a small matrix too. Sigh.
I changed it to just trap 0.0 and inserted some other code to
check for overflow/underflow conditions. This could be done
in a more robust way, since it's just a bunch of inner products,
but this will do for now. If users get an overflow or underflow,
they can always scale the matrix.
Thanks.
Jerry