From: ceriel Date: Thu, 11 Aug 1988 10:28:30 +0000 (+0000) Subject: leave maximum value if overflow trap is handled X-Git-Tag: release-5-5~2931 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=2cb7fcf861a9852dbb95fb4d7fd1b0babddf447c;p=ack.git leave maximum value if overflow trap is handled --- diff --git a/mach/proto/fp/compact.c b/mach/proto/fp/compact.c index 412cddb6f..186d41cfa 100644 --- a/mach/proto/fp/compact.c +++ b/mach/proto/fp/compact.c @@ -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; }