Re: Float comparison



Flash Gordon wrote:
Keith Thompson wrote:
CBFalconer <cbfalconer@xxxxxxxxx> writes:

.... snip ...

So what? doubles are used to store reals, more or less. ints
are used to store integers. 1.0+DBL_EPSILON/2.0 is a real[1].
1.5 is NOT an integer.

[1] but not a storable real, in a double.

It's that "more or less" that bites you, isn't it? Your model
makes some sense if you ignore those pesky details where it
falls apart.

<snip>

In addition doubles *are* used to store exact integral values
and integer types *are* used to store approximations. Any claim
that you have stored a range when you have in fact stored the
exact value that you intended to store is clearly wrong and would
make error analysis impossible.

So what? You are referring to the programming that is using that
object. I am talking about what you can deduce from the object in
isolation.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.


.



Relevant Pages

  • Re: Nightmare Before Xmas
    ... > Yeah, ... That BITES. ... > license justice. ... back to the store... ...
    (alt.games.video.xbox)
  • Re: Float comparison
    ... Flash Gordon wrote: ... snip ... ... care about the fact that the system attempted to store the ... let alone store it anywhere. ...
    (comp.lang.c)