Re: Line intersection point is wrong

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: emre(at)hasegeli(dot)com
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Line intersection point is wrong
Date: 2016-06-19 20:42:24
Message-ID: 19816.1466368944@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Emre Hasegeli <emre(at)hasegeli(dot)com> writes:
>> You haven't done anything to exclude the possibility that l1->B is zero,
>> so you could be getting zero-divide in the y calculation.

> Ah, yes. We can use l2 when l1->B is zero.

After working out the algebra by hand, I think the attached is correct
(and it does pass the regression tests, yay). I also made the
line_parallel and line_perp tests more symmetric and zero-divide-free.

regards, tom lane

Attachment Content-Type Size
fix-parallel-perp-and-intersect.patch text/x-diff 2.2 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message contact 2016-06-20 11:53:21 BUG #14202: pg_trgm: % uses incorrect comparison of similarity with the limit
Previous Message Emre Hasegeli 2016-06-19 20:30:08 Re: Line intersection point is wrong