comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » SVDFIT Problems
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: SVDFIT Problems [message #32055 is a reply to message #31937] Thu, 05 September 2002 13:15 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Bill wrote:
>
> Chris Torrence wrote:
>
>> Hi Bill,
>>
>> Actually, the SVDFIT code *does* use THRESH = TOL*wmax. If you look
>> carefully at the IDL code, around line 249, there is the following line:
>>
>> small=WHERE(variance LE max(variance)*thresh, cc)
>>
>> (The variable name "thresh" was an unfortunate choice, and should really
>> have been "tol".)
>>
>> Internally, the C code is identical to the Numerical Recipes code, except
>> for the TOL value, which is 1e-9 for both single and double precision. We
>> could consider adding a TOL keyword to the SVDFIT function, which would
>> allow the user to change this default.
>>
>> Cheers,
>>
>> Chris
>> Research Systems, Inc.
>> <snip>
>
> Two comments:
>
> 1. Unless the double keyword is being ignored, TOL should not be the same for
> single and double precision. All computers IDL is currently available on use
> IEEE 754 math. In this standard the mantissa is represented by 23 bits in
> single precision and 52 bits in double precision. With 754's hidden bit,
> single precision has a relative precison of 1/2^24 ~ 6e-8 and double has a
> relative precision of 1/2^53 ~ 1e-16. SVD should identify as singular any
> value that is largely determined by the precision of the arithmetic. Such

True, but it should also identify as singular any value that is largely
determined by the precision of the input data. With double precision
floating point, the precision of the result is likely to be dominated by
the precision of the input data, not by the precision of the arithmetic.

That's why TOL shouldn't just slavishly depend upon the precision of the
data type. It's also why TOL should be adjustable by the user.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: hello
Next Topic: sec : U Re: having IDL output to another X11 window

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 00:57:18 PDT 2025

Total time taken to generate the page: 0.47793 seconds