SVD in linalg_simple
Gerard Jungman
jungman@lanl.gov
Mon Oct 18 15:07:00 GMT 1999
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
More information about the Gsl-discuss
mailing list