Pristine Ack-5.5
[Ack-5.5.git] / modules / src / flt_arith / flt_chk.c
1 /*
2   (c) copyright 1989 by the Vrije Universiteit, Amsterdam, The Netherlands.
3   See the copyright notice in the ACK home directory, in the file "Copyright".
4 */
5
6 /* $Id: flt_chk.c,v 1.8 1994/06/24 11:15:43 ceriel Exp $ */
7
8 #include "flt_misc.h"
9
10 int     flt_status = 0;
11
12 void
13 flt_chk(e)
14         register flt_arith *e;
15 {
16         if (e->flt_exp >= EXT_MAX) {
17                 flt_status = FLT_OVFL;
18                 e->flt_exp = EXT_MAX;
19                 e->m1 = 0x80000000;
20                 e->m2 = 0;
21         }
22         if (e->flt_exp <= EXT_MIN) {
23                 flt_status = FLT_UNFL;
24                 e->flt_exp = 0;
25                 e->m1 = 0;
26                 e->flt_sign = 0;
27                 e->m2 = 0;
28         }
29 }