Floating point precision
Floating point numbers have inherant characteristics. Some are
good, like their large range, and some are not so good, like their
inability to precisely represent many useful values. This is a feature.
Get used to it.
The easy example is to try to represent the rational number 0.10
as a 32-bit floating point. It is always represented internally
as 0.09999999, which is usually good enough. After all, it rounds
to 0.10 reliably. Or use double precision floating point (64-bit)
and you will find that it is represented as 0.0999999999999, which
is again pretty close.
Classical science and engineering definitions of Precision and
Accuracy.
Science and enginnering have well established definitions for "accuracy"
and "precision" of measurements. They are not symonyms!
Accuracy is the deviation of a measurement (although usually the
mean of a set of measurements) from the "true" value being
measured.
Precision is the measure of the agreement of measured values with
each others, usually specified as the standard deviation.
Floating point number precision is not a measurement problem, 0.10
is always represented by the same number, one that is always a little
off from the "true" value.
|