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".
9 ADD TWO EXTENDED FORMAT NUMBERS
16 register EXTEND
*e1
,*e2
;
18 if ((e2
->m1
| e2
->m2
) == 0L) {
21 if ((e1
->m1
| e1
->m2
) == 0L) {
25 sft_ext(e1
, e2
); /* adjust mantissas to equal powers */
26 if (e1
->sign
!= e2
->sign
) {
27 /* e1 + e2 = e1 - (-e2) */
28 if (e2
->m1
> e1
->m1
||
29 (e2
->m1
== e1
->m1
&& e2
->m2
> e1
->m2
)) {
30 /* abs(e2) > abs(e1) */
36 e1
->m1
-= 1; /* carry in */
43 e1
->m1
-= 1; /* carry in */
49 if (b64_add(&e1
->mantissa
,&e2
->mantissa
)) { /* addition carry */
50 b64_rsft(&e1
->mantissa
); /* shift mantissa one bit RIGHT */
51 e1
->m1
|= 0x80000000L
; /* set max bit */
52 e1
->exp
++; /* increase the exponent */