From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Fixing geometic calculation |
Date: | 2009-08-07 15:40:58 |
Message-ID: | 22842.1249659658@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Sam Mason <sam(at)samason(dot)me(dot)uk> writes:
> I would agree with Paul that EPSILON is a hack and probably should be
> removed.
It's a hack but it's dealing with an extremely real problem, namely
the built-in inaccuracy of floating-point arithmetic. You can't just
close your eyes to that and hope that everything will be okay.
A quick look through the geometry sources says that we might not be
critically dependent on anything except the assumption that two values
that aren't FPeq() will have a nonzero difference. (If you think this
is a tautology, you don't know enough about floating point arithmetic
to be qualified to offer an opinion here...) We might be able to base
a tighter comparison procedure on that rule. It would take a lot more
investigation to be sure though.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jaime Casanova | 2009-08-07 15:44:44 | Re: Filtering dictionaries support and unaccent dictionary |
Previous Message | Kevin Grittner | 2009-08-07 15:39:19 | Re: Review: Revise parallel pg_restore's scheduling heuristic |