Mercurial > octave-nkf
diff scripts/polynomial/polygcd.m @ 10549:95c3e38098bf
Untabify .m scripts
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Fri, 23 Apr 2010 11:28:50 -0700 |
parents | f6e0404421f4 |
children | 693e22af08ae |
line wrap: on
line diff
--- a/scripts/polynomial/polygcd.m Fri Apr 23 11:13:48 2010 -0700 +++ b/scripts/polynomial/polygcd.m Fri Apr 23 11:28:50 2010 -0700 @@ -48,32 +48,32 @@ if (nargin == 2 || nargin == 3) if (nargin == 2) if (isa (a, "single") || isa (b, "single")) - tol = sqrt (eps ("single")); + tol = sqrt (eps ("single")); else - tol = sqrt (eps); + tol = sqrt (eps); endif endif if (length (a) == 1 || length (b) == 1) if (a == 0) - x = b; + x = b; elseif (b == 0) - x = a; + x = a; else - x = 1; + x = 1; endif else a /= a(1); while (1) - [d, r] = deconv (b, a); - nz = find (abs (r) > tol); - if (isempty (nz)) - x = a; - break; - else - r = r(nz(1):length(r)); - endif - b = a; - a = r / r(1); + [d, r] = deconv (b, a); + nz = find (abs (r) > tol); + if (isempty (nz)) + x = a; + break; + else + r = r(nz(1):length(r)); + endif + b = a; + a = r / r(1); endwhile endif else