Re: Yet again, The Sky is Falling! [message #52871 is a reply to message #52870] |
Thu, 08 March 2007 10:22   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
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.")
|
|
|