On Fri, Aug 07, 2009 at 12:50:39PM -0400, Tom Lane wrote:
> Sam Mason <s...@samason.me.uk> writes:
> > Sorry, I'm struggling to parse that.  I think it's all the double
> > negatives.  Are you saying that HYPOT() should really return zero when
> > it's currently giving back would be FPzero?
> 
> No, I'm worried about code that supposes that it can divide by (x - y)
> after testing that FPeq(x,y) is not true.  point_sl() for instance.

OK, but I'm still not sure what you're getting at.  If it's infinities
and NaNs then they shouldn't matter and will be taken care of by the
normal FP rules anyway.

> We could perhaps fix those specific issues by testing the difference
> explicitly instead of doing it like that.  But there's still the overall
> problem of error accumulation ...

Errors will accumulate whatever happens, that's why things like interval
arithmetic exist that usefully track those errors and why I said testing
EPSILON isn't a useful.

-- 
  Sam  http://samason.me.uk/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to