1988-04-07 11:40:46 +00:00
|
|
|
/*
|
|
|
|
(c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
|
|
|
|
1994-06-24 14:02:31 +00:00
|
|
|
/* $Id$ */
|
1988-04-07 11:40:46 +00:00
|
|
|
|
1988-04-07 10:57:49 +00:00
|
|
|
/*
|
1988-07-25 10:46:15 +00:00
|
|
|
SEPERATE INTO EXPONENT AND FRACTION (FEF 4)
|
1988-04-07 10:57:49 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "FP_types.h"
|
|
|
|
|
1993-01-05 12:06:58 +00:00
|
|
|
void
|
1989-07-25 14:21:09 +00:00
|
|
|
fef4(r,s1)
|
1993-01-05 12:06:58 +00:00
|
|
|
SINGLE s1;
|
1989-07-25 14:21:09 +00:00
|
|
|
struct fef4_returns *r;
|
1988-04-07 10:57:49 +00:00
|
|
|
{
|
|
|
|
EXTEND buf;
|
1989-07-25 14:21:09 +00:00
|
|
|
register struct fef4_returns *p = r; /* make copy; r might refer
|
|
|
|
to itself (see table)
|
|
|
|
*/
|
1988-04-07 10:57:49 +00:00
|
|
|
|
1993-01-05 12:06:58 +00:00
|
|
|
extend(&s1,&buf,sizeof(SINGLE));
|
1989-08-15 09:04:49 +00:00
|
|
|
if (buf.exp == 0 && buf.m1 == 0 && buf.m2 == 0) {
|
|
|
|
p->e = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
p->e = buf.exp+1;
|
|
|
|
buf.exp = -1;
|
|
|
|
}
|
1993-01-05 12:06:58 +00:00
|
|
|
compact(&buf,&p->f,sizeof(SINGLE));
|
1988-04-07 10:57:49 +00:00
|
|
|
}
|