View Single Post
  #24   Report Post  
Posted to microsoft.public.excel.misc
Jeff in GA Jeff in GA is offline
external usenet poster
 
Posts: 23
Default Unacceptable floating point errors

Alain,

I'm glad I was able to instigate such an inspired thread.

I do not mean this in a derogatory way, but many of you are so accustomed to
operating within the machine that the logic of your matrix is perfectly valid
to you. Worse yet, some of you react with indignation, if not derision, when
a person suggests that .29 - .28 should equal .010000000000

For you "0.01 *IS EXACTLY THE SAME AS* 0.00999999999999995", but even Excel
doesn't think it is the same thing when using conditional statements.
Moreover, the unpredictability of it makes it even more insidious. I.e., the
problem does not occur for .30 - .29 and many other pairs, so it has the
effect of being a random error generator, IMO.

I realize that the very notion of "customer" is silly and old fashioned, but
to the customer the reaction from those inside the MS matrix appears to be:
"you're a fool to expect the mathematical results to be correct, and a moron
if you don't understand the unpredictable intricacies of floating point
mathematics, and that this imprecision has the blessing of the IEEE!"

Though it appears stupid to you, I was simply expecting .29 - .28 to equal
exactly .01, and I was simply astonished when it didn't, and I honestly could
not imagine why it didn't.

In order to deal with really moronic customers like me (there's that
"customer" word again -- I just can't help myself!), MS would be better
served to provide a more conspicuous forewarning of this possible occurrence.
I realize that it does not behoove an arrogant corporation to phrase it
thusly, but the message should be along the lines that: "In certain
instances, a mathematical result is produced which is not perfectly precise.
Unfortunately, this is unavoidable to due to the limitations inherent to any
calculation algorithm that reduces the values to binary equivalents [link to
technical explanation] and we regret any inconvenience that may present. Here
is a how you can anticipate and minimize the consequences of this problem
[link].

My point is that the explanation from MS should respect the fact that many
of us are reasonably expecting consistent precision (e.g., like .29 - .28 =
..01000), and that we are not prepared for unpredictable and sporadic
exceptions. It's like the clock that strikes thirteen, then you wonder if
all the other times were correct.

....Jeff


"Alain Dekker" wrote:

Hi Jeff,