This is the mail archive of the gsl-discuss@sourceware.cygnus.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SVD in linalg_simple


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]