X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fpolynomial_root.cpp;h=5098f3d477a58d9201737181b7e863faface2337;hb=6fcfeb5b77c28b403b9fecc9bafcde6834447c9a;hp=97e507e590227d7bc28c24bc4347bfb0ae84c57a;hpb=cc54c38609ee9745ad678e5e9b9d7d2912be9c95;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/polynomial_root.cpp b/synfig-core/trunk/src/synfig/polynomial_root.cpp index 97e507e..5098f3d 100644 --- a/synfig-core/trunk/src/synfig/polynomial_root.cpp +++ b/synfig-core/trunk/src/synfig/polynomial_root.cpp @@ -101,8 +101,8 @@ cycles with MR different fractional values, once every MT steps, for MAXIT total /* Given the degree m and the m+1 complex coefficients a[0..m] of the polynomial sum(i=0,m){a[i]x^i}, and given a complex value x, this routine improves x by laguerre's method until it converges, -within the acheivable roundoff limit, to a root of teh given polynomial. The number of iterations taken -is returned as its. +within the achievable roundoff limit, to a root of the given polynomial. The number of iterations taken +is returned as `its'. */ void laguer(Complex a[], int m, Complex *x, int *its) { @@ -123,7 +123,7 @@ void laguer(Complex a[], int m, Complex *x, int *its) d = f = Complex(0,0); //clear variables for use abx = abs(*x); //the magnitude of the current root - //Efficent computation of the polynomial and it's first 2 derivatives + //Efficient computation of the polynomial and its first 2 derivatives for(j = m-1; j >= 0; --j) { f = (*x)*f + d; @@ -195,10 +195,10 @@ void laguer(Complex a[], int m, Complex *x, int *its) #define EPS 2.0e-6 #define MAXM 100 //a small number, and maximum anticipated value of m.. -/* Given the degree m ad the m+1 complex coefficients a[0..m] of the polynomial a0 + a1*x +...+ an*x^n +/* Given the degree m and the m+1 complex coefficients a[0..m] of the polynomial a0 + a1*x +...+ an*x^n the routine successively calls laguer and finds all m complex roots in roots[1..m]. The boolean variable polish should be input as true (1) if polishing (also by Laguerre's Method) - is desired, false (0) if teh roots will be subsequently polished by other means. + is desired, false (0) if the roots will be subsequently polished by other means. */ void RootFinder::find_all_roots(bool polish) {