From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | jeremie(dot)thomassey(at)gmail(dot)com |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #6675: Box overlap with infinity edge |
Date: | 2012-06-06 04:58:48 |
Message-ID: | 6245.1338958728@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
jeremie(dot)thomassey(at)gmail(dot)com writes:
> I can't understand this result :
> SELECT box '((1,1),(infinity, 1))' && box '((2, 1),(infinity, 1))';
> ?column?
> ---------
> f
> Isn't it supposed to return true? The documentation doesn't really say
> anything about infinite edge.
The test for this involves
FPge(box1->high.x, box2->high.x)
where FPge is defined as
#define FPge(A,B) ((B) - (A) <= EPSILON)
When both high.x values are infinity, you have infinity minus infinity,
which yields NaN in IEEE arithmetic, so the comparison to epsilon comes
out false.
In general I don't think we promise that geometric operations involving
infinite endpoints will behave sanely. There are probably a boatload
of corner cases besides this one that'd need to be fixed before we
could consider that a supported case.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | katsumata.tomonari | 2012-06-06 05:33:44 | BUG #6676: checkpointer does not work by SIGINT. |
Previous Message | Dean Schulze | 2012-06-05 23:26:53 | JDBC Driver can't read UUID from database |