From 2cb7fcf861a9852dbb95fb4d7fd1b0babddf447c Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 11 Aug 1988 10:28:30 +0000 Subject: [PATCH] leave maximum value if overflow trap is handled --- mach/proto/fp/compact.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; } -- 2.34.1