Re: Float comparison



In article <49F8E352.2403A016@xxxxxxxxx> cbfalconer@xxxxxxxxxxxxx writes:
"Dik T. Winter" wrote:
cbfalconer@xxxxxxxxxxxxx writes:
"Dik T. Winter" wrote:
cbfalconer@xxxxxxxxxxxxx writes:
...
We form xmy by multiplying the values (ranges) in x and y:

xmy = x*y - x*y*ex - x*y*ey - x*y*ex*ey
= x*y *(1 - ex - ey - ex*ey) (lower range)
Here ...............^^^^^^^

and all I said is that we can neglect ex*ey, since its magnitude is
at least several orders below that of ex or ey.
...
Yes, it is a range centered on x*y, but the bounds of the range are
*not* eps(x*y), but eps(x + y), which can be much larger (e.g. if
|x|,|y| < 1).

Did you deliberately ignore the algebra I posted? It had - ex -
ey, but recommended ignoring the term in ex*ey.

Did you deliberately ignore what I wrote? I wrote: "the bounds of the
range are *not* eps(x * y), but eps(x + y)". Sheesh.

I don't know why you are changing the nomenclature, and ignoring
the statement. It has an error factor of "(1 - ex - ey - ex*ey)".
Note the sum and the product. The product is neglible.

Yes, so it is bounded by eps(x + y), as I did state.

That is
not centered on xmy, but is the range on one side. Change the -
signs to + signs to get the opposite side.

Are we speaking the same language?

Apparently not. You stated that a floating point value in a variable
represented a range. So given z = x * y, z would represent a range,
bounded by eps(z) (where eps(z) is shorthand for an appropriate expression).
I asked you how it is possible that given that x and y represent a range
that the values possible in the (mathematical) result of x * y did *not*
fit in the range represented by z. You avoided this by stating that the
difference was negligible. It is *not*. The bounds for the range of z
are eps(x * y), which can be small compared to eps(x + y) (or large).
--
dik t. winter, cwi, science park 123, 1098 xg amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
.



Relevant Pages

  • Re: Float comparison
    ... "Dik T. Winter" wrote: ... and all I said is that we can neglect ex*ey, since its magnitude is ... but recommended ignoring the term in ex*ey. ...
    (comp.lang.c)
  • Re: Unbiased Spectroscopic Data Prove QED is Inaccurate
    ... neglect this" which is not a question, but a statement implying I am some ... kind of idiot if I do think I can neglect this. ... the same order of magnitude as the claimed failure. ...
    (sci.physics.relativity)