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