ack/modules/src/flt_arith/flt_chk.c

28 lines
481 B
C
Raw Normal View History

1989-07-10 11:17:19 +00:00
/*
(c) copyright 1989 by the Vrije Universiteit, Amsterdam, The Netherlands.
See the copyright notice in the ACK home directory, in the file "Copyright".
*/
/* $Header$ */
#include "misc.h"
int flt_status = 0;
flt_chk(e)
register flt_arith *e;
{
if (e->flt_exp >= EXT_MAX) {
flt_status = FLT_OVFL;
e->flt_exp = EXT_MAX;
e->m1 = 0x80000000;
1989-07-10 11:17:19 +00:00
}
if (e->flt_exp <= EXT_MIN) {
flt_status = FLT_UNFL;
e->flt_exp = 0;
e->m1 = 0;
1989-07-10 11:17:19 +00:00
e->flt_sign = 0;
}
1989-10-19 14:50:52 +00:00
e->m2 = 0;
1989-07-10 11:17:19 +00:00
}