Re: Yet again, The Sky is Falling! [message #52868 is a reply to message #52863] |
Thu, 08 March 2007 10:27   |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
David Fanning 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. :-)
Good point. Same for other simple numbers, like 1.0. I even think you could replace
"accurately" with "exactly" in your above statement and not be wrong (in a computer-y,
hand-wavy sense if nothing else :o)
paulv
--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
|
|
|