Re: IEEE-754



* Roman Töngi:
IEEE-754 Arithmetic:
Most real numbers can't be stored exactly on the computer, but there can
be stated the range within which a machine number lies.

For the following example, I assume double precision and the round mode in effect to be 'round to nearest' and that the number lies within the
normalized range:

Definitions:
x := real number
round(x) := correctly rounded normalized number
eps := machine epsilon (2^(-52) for double precision)
abs(x) := absolute value of x

That is:

round(x) = x*(1 + delta)

This is not how rounding works.


with delta:

abs(delta) <= 1/2*eps (round to nearest)

i.d. abs(delta) <= 2^(-53) (double precision)

abs(delta) corresponds to the relative rounding error.

Now I can state the range including round(x):

-----------------------------------------
x*(1-2(-53)) <= round(x) <= x*(1+2^(-53))
-----------------------------------------

Is this the correct range according to my assumptions?

The conclusion is just about right for a positive normalized number, but the derivation of that conclusion does not seem to be sensible.

Directly about your question: "What Every Computer Scientist Should Know About Floating-Point Arithmetic", <url: http://docs.sun.com/source/806-3568/ncg_goldberg.html>. The thing is that although everybody refer to this paper, very few actually read it. It's a way of saying, if you're not doing serious numerical work, then stick to the simple conceptual understanding and /test/ your code.

You might also want to check out (might be more useful!) <url: http://docs.sun.com/source/806-3568/ncg_math.html#866>.

And perhaps (almost) the original IEEE 754 standard, with speling corections: <url: http://www.validlab.com/754R/standards/754.pdf>.


--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
.