Re: fix(4.70*100) is... 469 [message #53545 is a reply to message #53544] |
Thu, 19 April 2007 12:07   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> I don't think there is anything "wrong" about your
> assumption, except that it doesn't reflect reality.
> This is how most of us go wrong with assumptions.
> We assume something is so that ain't so. :-)
Just to enlarge on this a bit, after poor typing
skills, incorrect assumptions probably makes up
the largest percentage of "bugs" in software. If
you hear someone shouting "I don't f---ing
believe this!", you can be almost certain an
assumption is going to come crashing down.
In general, there are better outcomes when our
assumptions closely model reality than when they
do not. In this particular case, if your assumption
is "floating point math on computers can drive you
crazy", then you are likely to make fewer mistakes
than if your assumption is "computers always do
what I expect them to do."
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.")
|
|
|