Re: Float comparison
- From: "Dik T. Winter" <Dik.Winter@xxxxxx>
- Date: Mon, 4 May 2009 11:54:41 GMT
In article <49F8E352.2403A016@xxxxxxxxx> cbfalconer@xxxxxxxxxxxxx writes:
"Dik T. Winter" wrote:
cbfalconer@xxxxxxxxxxxxx writes:
"Dik T. Winter" wrote:...
cbfalconer@xxxxxxxxxxxxx writes:
...Here ...............^^^^^^^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)
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/
.
- Follow-Ups:
- Re: Float comparison
- From: CBFalconer
- Re: Float comparison
- From: Richard Tobin
- Re: Float comparison
- Prev by Date: Re: Float comparison
- Next by Date: Re: Float comparison
- Previous by thread: Re: Float comparison
- Next by thread: Re: Float comparison
- Index(es):
Relevant Pages
|