2 (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 See the copyright notice in the ACK home directory, in the file "Copyright".
6 /* $Id: flt_flt2ar.c,v 1.6 1994/06/24 11:15:52 ceriel Exp $ */
13 register flt_arith *e;
15 /* Convert the flt_arith "n" to an arith.
18 struct flt_mantissa a;
22 if (e->flt_sign && uns) {
23 flt_status = FLT_UNFL;
27 /* absolute value of result < 1.
28 Return value only depends on sign:
33 if (e->flt_exp > 8*sizeof(arith)-2 + uns) {
34 /* probably overflow, but there is one exception:
37 e->flt_exp == 8*sizeof(arith)-1 &&
39 e->m1 == 0x80000000) {
40 /* No overflow in this case */
44 flt_status = FLT_OVFL;
45 e->flt_exp = 8*sizeof(arith)-2 + uns + e->flt_sign;
58 flt_b64_sft(&a, 63-e->flt_exp);
59 n = a.flt_l_32 | ((a.flt_h_32 << 16) << 16);
60 /* not << 32; this could be an undefined operation */
61 return e->flt_sign ? -n : n;