Re: Fixing geometic calculation
От | Sam Mason |
---|---|
Тема | Re: Fixing geometic calculation |
Дата | |
Msg-id | 20090807175136.GN5407@samason.me.uk обсуждение исходный текст |
Ответ на | Re: Fixing geometic calculation (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Fixing geometic calculation
|
Список | pgsql-hackers |
On Fri, Aug 07, 2009 at 12:50:39PM -0400, Tom Lane wrote: > Sam Mason <sam@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/
В списке pgsql-hackers по дате отправления: