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

Home » Public Forums » archive » Re: Yet again, The Sky is Falling!
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: Yet again, The Sky is Falling! [message #52855 is a reply to message #52854] Thu, 08 March 2007 12:22 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
yp wrote:
> On Mar 8, 6:22 pm, David Fanning <n...@dfanning.com> wrote:
>> yp writes:
>>> Why is such discrepancy? In my problem the accuracy after 3rd decimal
>>> point is not so important, however, after seeing the results I lose
>>> confidence on IDL's capability on Real number arithmetic!
>>> May be I am missing something?
>> Well, maybe because I can't see it, but I'm immediately
>> suspicious of what is going on in OPERATION. If you
>> perform these two calls in the opposite order do you
>> get the same result? That is, do you know for a fact
>> that A, B, and F are not changing? (You have compared
>> them before and after?)
>>
>> If it was some other number, perhaps, but zero!? It seems
>> to me all computers can represent 0 accurately. :-)
>>
>> Cheers,
>>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
>
> Thanks David, for your suggestion. I am pretty sure that none of the
> argunet values change before or after the "Operation". And yes, the
> discrepancy occurs both ways...
>
> Here is the section from my running script.
>
> ;-------------
> PRO test_brdf
>
> wave = [412.5, 442.5, 490., 510., 560., 620., 660.] ;A (static)
> nwave = n_elements(wave) ;B (static)
> sza = 45.0D ;C (static)
> vza = 1.078D ;D (static)
> dphi = 0.0D ;E (static)
> chl = 0.03D ;F (static)
> null = 0.0D
>
> print,'BEFORE: ', wave, nwave, sza, vza, dphi, chl
> foq = (foq0 = (dblarr(nwave)))
>
> for i=0, n_elements(chl)-1 do begin
> int_LUT, wave, nwave, 0.0D, 0.0D, 0.0D, chl[i], foq0 ;Case1
> ; int_LUT, wave, nwave, null, null, null, chl[i], foq0 ;Case2
> int_LUT, wave, nwave, sza[i], vza[i], dphi[i], chl[i], foq
>
> print,'AFTER: ',wave, nwave, sza, vza, dphi, chl
> help,BRDF
>
> print,'BRDF: ',double(foq0[*]) / double(foq[*])

why are you using DOUBLE in the above line?

It seems all your numbers are exactly the same until you print the resultant foq0/foq. All
the (internal to int_LUN I assume) f/Q numbers are the same.

Why not just do,

print,'BRDF: ',foq0/foq

?

--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Array resize with arbitrary arithmetic
Next Topic: mpeg creation problem

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

Current Time: Sat Oct 11 01:52:55 PDT 2025

Total time taken to generate the page: 0.40087 seconds