From: Connor McAdams Subject: Re: [PATCH 4/4] d2d1: Implement cubic bezier-line intersection. Message-Id: Date: Thu, 2 Apr 2020 12:42:03 -0400 In-Reply-To: <3574ab92-2404-529b-0e86-6b910387bbc7@gmail.com> References: <20200331201103.15219-1-conmanx360@gmail.com> <20200331201103.15219-4-conmanx360@gmail.com> <346d7617-c4d0-2b16-35b6-e3cd92157695@gmail.com> <68805882-3179-3665-63eb-7a0902694add@debian.org> <3574ab92-2404-529b-0e86-6b910387bbc7@gmail.com> I will see if I can get an Alberth method function written without too much difficulty and test it out, maybe run some speed tests between the two. Also, I guess I should switch over to doubles then as well. I'll see if that makes any differences. On Wed, Apr 1, 2020 at 1:14 PM Paul Gofman wrote: > > On 4/1/20 20:03, Giovanni Mascellani wrote: > > Il 01/04/20 18:46, Paul Gofman ha scritto: > >> Given the complex roots are not needed here and the polynomial is always > >> cubic, is this generic method really beneficial? It would probably be > >> simpler and quicker to find one root x1 with simple bisection, then > >> divide the polynomial into (x - x1) and deal with remaining quadratic > >> equation. > > This kind of division is typically numerically unstable. It might be > > that for cubic polynomials the problem is not very apparent, > > Yes, factoring out the roots from a high degree polynomial can > accumulate the error, but how's that a problem for just one root? > > Also, I think just using double precision in analytical solution will > avoid any practical stability problems in this case. > >