Re: Float comparison



gordonb.rhrsn@xxxxxxxxxxx (Gordon Burditt) writes:
No, you misunderstand. Cbf
(whatever that is. In any case, it's not relevant.)

Cbf is CBFalconer, who's been posting heavily on this thread.

is stating that a value represents a range.

Physics also emphasizes that measurements are inherently inaccurate,
especially when using instruments cheap enough they'll let YOU use
them. Early on you learn that "95.000 inches" implies much greater
measurement accuracy than "95.0 inches", whether you get that
measurement anywhere near a computer or calculator or not.
[snip]

We weren't talking about measurements. We were talking about stored
floating-point values. For example, 95.0 and 95.000 are exactly the
same value in C, and may or may not be the result of any measurement.

A given stored floating-point value might have some error range
associated with it, but the floating-point types themselves are
not capable of representing such an error range.

(Permission to quote my words without proper attribution is denied.
If you don't want to use an ordinary attribution line, quoting
the following is sufficient: I, Keith Thompson <kst-u@xxxxxxx>
wrote the above.)

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.


Quantcast