Re: line_perp() (?-|) is broken.

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: emre(at)hasegeli(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: line_perp() (?-|) is broken.
Date: 2018-03-07 00:20:28
Message-ID: 20180307.092028.236363887.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, I'm returning to here sonn.

I regard Emre's work is aiming to refactor (not improve its
functionality of) the code, on the other hand thins one is a
separate bug fix which also should be backpatched.

But, honestrly I'm not sure such small fix would improve the
current situnation of the geometric operators at any rate.

At Sat, 03 Mar 2018 10:43:26 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote in <31399(dot)1520091806(at)sss(dot)pgh(dot)pa(dot)us>
> Emre Hasegeli <emre(at)hasegeli(dot)com> writes:
> >> Possibly this objection is pointless, because I'm not at all sure that
> >> the existing code is careful about how it uses FPeq/FPzero; perhaps
> >> we're applying EPSILON to all manner of numbers that don't have units
> >> of the coordinate space. But this won't help make it better.

Agreed.

> > The existing code was probably paying attention to this particular
> > one, but it fails to apply EPSILON meaningfully to many other places.
> > For example lseg_parallel() and lseg_perp() applies it 2 times to the
> > same input. First point_sl() compares x coordinates with FPeq(), and
> > then the returned slopes are compared again with FPeq().
>
> Yeah, comparing a slope to EPSILON sure feels wrong :-(

It is a quite significant problem to fix and would be
controversial in detail. But, anyway, we are focusing on other
points that are less controversial. Then cook the EPSILON in the
next stage.

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2018-03-07 00:22:35 Re: TAP test module - PostgresClient
Previous Message Tom Lane 2018-03-06 23:39:25 Re: Temporary tables prevent autovacuum, leading to XID wraparound