Re: Fixing geometic calculation - Mailing list pgsql-hackers

From Paul Matthews
Subject Re: Fixing geometic calculation
Date
Msg-id 4A7CCFDA.6060306@netspace.net.au
Whole thread Raw
In response to Re: Fixing geometic calculation  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Fixing geometic calculation  (marcin mank <marcin.mank@gmail.com>)
List pgsql-hackers
Tom Lane wrote:
> 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.
>
> 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 ...
>
>             regards, tom lane
>   
IEEE754 does not allow two number X and Y, such that X!=Y and (X-Y)==0.
And since IEEE754 has been around since the 70's or 80's I think we can
start relying on its existence and behavior by now.

I don't see why it should be is postgres job to worry about error
accumulation. And then why only worry about it in geometric
calculations. Where in normal postgres code, or in perl, python, lisp,
or any in any other general purpose tool, is it where you ask it to tell
you 1.0+1.0 it responds with 2.0 +or- 0.0000000000000001?


pgsql-hackers by date:

Previous
From: Paul Matthews
Date:
Subject: Re: Fixing geometic calculation
Next
From: Herodotos Herodotou
Date:
Subject: Re: Join optimization for inheritance tables