Avi Kivity <[EMAIL PROTECTED]> writes:

| On Wed, 2005-07-06 at 15:54 +0300, Michael Veksler wrote:
| 
| > > most architectures have different bit representations for +0.0 and -0.0,
| > > yet the two values compare equal.
| > >
| > 
| > Yet, their sign bit is observable through   things like
| >   assert(a == 0.0);
| >   assert(b == 0.0);
| >   1/(1/a+ 1/b)
| > which would give either NaN or 0 depending on the sign
| > of a and b.
| > 
| > So do you want one or two copies in the set?
| > 
| what matters is whether the sign bit is observable through the equality
| predicate. in the case of the operator==(double, double), it is not
| observable, so there should be only one copy in a set.

Yes.

That logical framework has some "problems" though.  Assume x is  NaN,
then you would end up with as many xs as you insert in the set.

-- Gaby

Reply via email to