ack/mach/proto/fp/fef4.c

33 lines
597 B
C
Raw Normal View History

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".
*/
/* $Header$ */
1988-04-07 10:57:49 +00:00
/*
SEPERATE INTO EXPONENT AND FRACTION (FEF 4)
1988-04-07 10:57:49 +00:00
*/
#include "FP_types.h"
struct fef4_returns {
int e;
1988-04-07 10:57:49 +00:00
_float f;
};
1989-07-25 14:21:09 +00:00
fef4(r,s1)
1988-04-07 10:57:49 +00:00
_float 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
extend((_double *) &s1,&buf,sizeof(_float));
1989-07-25 14:21:09 +00:00
p->e = buf.exp+1;
buf.exp = -1;
compact(&buf,(_double *) &p->f,sizeof(_float));
1988-04-07 10:57:49 +00:00
}