[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

2035.0. "unit circle problem with floating point numbers" by FLOYD::YODER (MFY) Mon Apr 01 1996 15:39

Suppose we have a domain D of (signed) floating point numbers with base b=2,
mantissa length m > 0, and exponent range e .. 1 where e < -m.  (We don't need
the larger floating point numbers for our results.)  (The fraction f, of m
base-b digits, satisfies 1/b <= f < 1).

Let * be multiplication with rounding, and # be addition with rounding (for the
moment, assume we don't care which way rounding happens if the result is exactly
halfway between two numbers).

Let u,v be in D.  Show that if u^2 + v^2 <= 1, then u*u # v*v <= 1.
(In other words, if the exact result is <= 1, then the rounded sum of the
rounded squares is <= 1.)

Show that if b is allowed to be an even base /= 2, the result still holds if
"round to even" is used as the rounding rule for results exactly halfway between
two floating point numbers.  Can this requirement be relaxed?

It should be easy to show that adding "denormalized" numbers doesn't change this
result.
T.RTitleUserPersonal
Name
DateLines
2035.1HANNAH::OSMANsee HANNAH::IGLOO$:[OSMAN]ERIC.VT240Tue Apr 02 1996 20:066
What does "e .. 1" mean in this case ?

It almost looks like something like "e is in the range a..b".

/Eric
2035.2Makes sense as a rangeWIBBIN::NOYCEEV5 issues 4 instructions per meterTue Apr 02 1996 20:073
I read it to mean
	e <= exponent_of_a_number <= 1
	where e < -m
2035.3yes, it was a rangeFLOYD::YODERMFYTue Apr 02 1996 20:171
Yes, it was meant as a range.  Sorry, I was mixing notations.
2035.5solution and generalizationFLOYD::YODERMFYThu Apr 11 1996 18:4317
I have found a proof that is easier than the first one I found.  Unfortunately
there doesn't seem to be anything special about the unit circle here.  Also, the
generalization seems less elegant than the original result somehow.  Sigh.

A generalization of the given theorem is:

If u, v are nonnegative reals (not necessarily in D) such that u + v = 1, then
round(u) # round(v) <= 1.

For bases b > 2 the proof is easy (including when b is odd).  The maximum errors
in round(u) and round(v) are (1/2)b^-m; but the next number in D above 1 is N =
1+b^(1-m), so round(u)+round(v) is closer to 1 than N.

This gives a 16-ton clue as to how to prove the b = 2 case: here, unless u = v =
1/2, in which case the theorem is obvious, one of u and v must be > 1/2 and the
other < 1/2.  The rounding error for the smaller one, then, is at most
(1/4)2^-m, and reasoning similar to the above gives us the desired result.
2035.6Only halfway there?WIBBIN::NOYCEEV5 issues 4 instructions per meterFri Apr 12 1996 15:032
.5 helps if you can show that u*u isn't too much bigger than u^2.
That isn't obvious to me yet.
2035.7reply to .6FLOYD::YODERMFYMon Apr 15 1996 14:312
The new u and v, as it were, that you apply .5 to are u^2 and v^2, that is, the
*exact* (not rounded) squares of the given u and v.
2035.8WIBBIN::NOYCEEV5 issues 4 instructions per meterMon Apr 15 1996 15:545
Got it.  I read too slowly before.

Sort of a "meet-in-the-middle" analysis for error propagation across
multiple operations:  Add in the error for the early operations, and
use the axioms of rounding for the last operation.  Cute!