diff scripts/polynomial/polygcd.m @ 7795:df9519e9990c

Handle single precision eps values
author David Bateman <dbateman@free.fr>
date Mon, 12 May 2008 22:57:11 +0200
parents 120f3135952f
children 6f2d95255911
line wrap: on
line diff
--- a/scripts/polynomial/polygcd.m
+++ b/scripts/polynomial/polygcd.m
@@ -45,7 +45,11 @@
 
   if (nargin == 2 || nargin == 3)
     if (nargin == 2)
-      tol = sqrt (eps);
+      if (isa (a, "single") || isa (b, "single"))
+	tol = sqrt (eps ("single"));
+      else
+	tol = sqrt (eps);
+      endif
     endif
     if (length (a) == 1 || length (b) == 1)
       if (a == 0)