Re: Fixing geometic calculation
| От | Tom Lane |
|---|---|
| Тема | Re: Fixing geometic calculation |
| Дата | |
| Msg-id | 22842.1249659658@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Fixing geometic calculation (Sam Mason <sam@samason.me.uk>) |
| Ответы |
Re: Fixing geometic calculation
|
| Список | pgsql-hackers |
Sam Mason <sam@samason.me.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
В списке pgsql-hackers по дате отправления: