h37064
s 00030/00000/00000
d D 1.1 82/08/03 08:42:17 cecily 1 0
e
u
U
t
T
I 1
union kludge {
	double  d;
	char    byte[];
	int     word[];
};

double
modf(f, aint)
double f;
double *aint;
{
	union kludge fint;
	register int bkeep, blose;

	fint.d = f;
	bkeep = ((fint.byte[0]&0x7f)-0x40) << 2;
	if (bkeep <= 0) {
		*aint = 0.0;
		return(f);
	}
	blose = 56 - bkeep;
	if (blose < 32) {
		fint.word[1] &= (~0) << blose;
	} else {
		fint.word[1] = 0;
		fint.word[0] &= (~0) << (blose-32);
	}
	*aint = fint.d;
	return(f - fint.d);
}
E 1
