Floats, precision and probability distributions
Richard J. Fateman
fateman at cs.berkeley.edu
Wed Jul 14 16:51:44 CEST 1999
I quite disagree with miker, and to some extent Bruce Miller.
Floating point numbers are NOT probability distributions.
Thinking about them that way leads only to useless and often
even counterproductive computational schemes. See what
Mathematica has done, for example.
Floating point numbers are EXACT RATIONAL NUMBERS. Namely
those numbers among the reals that can be exactly represented
in the form sign X fraction X radix^exponent, with fraction=
If you want to represent an interval, a distribution, etc,
then use additional information. I would suggest for
"accuracy" either relative or absolute error, terms that
you may find in numerical analysis references. If you want
a distribution, some other characterization of the width and
I find the notion that you will put down some number of decimal
digits and hope that the programs will read/write them correctly
to the right number of digits kind of iffy. And this hex coding
business is really a waste. There are over a hundred printing ASCII
characters. chosing 16 of them from an irrelevant base (wrt floats)
does not make the numbers human readable. It does not help the
computer especially, and wastes space. If you want a human readable
item, how about
<compact encoding> %%comment.. this is about 3.14e3 ...
combining ease for the computer, and some for the human.
More information about the Om