leave maximum value if overflow trap is handled
authorceriel <none@none>
Thu, 11 Aug 1988 10:28:30 +0000 (10:28 +0000)
committerceriel <none@none>
Thu, 11 Aug 1988 10:28:30 +0000 (10:28 +0000)
mach/proto/fp/compact.c

index 412cddb..186d41c 100644 (file)
@@ -1,4 +1,4 @@
-/*
+e
   (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
   See the copyright notice in the ACK home directory, in the file "Copyright".
 */
@@ -36,7 +36,8 @@ int   size;
                if (f->exp > DBL_MAX)   {
 dbl_over:                      trap(EFOVFL);
                        f->exp = DBL_MAX;
-                       f->m1 = f->m2 = 0L;
+                       f->m1 = 0xffffffffL;
+                       f->m2 = DBL_ZERO;
                        if (error++)
                                return;
                }
@@ -121,7 +122,8 @@ dbl_over:                   trap(EFOVFL);
                if (f->exp > SGL_MAX)   {
 sgl_over:                      trap(EFOVFL);
                        f->exp = SGL_MAX;
-                       f->m1 = f->m2 = 0L;
+                       f->m1 = SGL_ZERO;
+                       f->m2 = 0L;
                        if (error++)
                                return;
                }