/* $Header:modf.c 12.0$ */
/* $ACIS:modf.c 12.0$ */
/* $Source: /ibm/acis/usr/src/lib/libc/ca/gen/RCS/modf.c,v $ */

#ifndef lint
static char *rcsid = "$Header:modf.c 12.0$";
#endif


#include <ieee.h>

double modf(value,iptr)
double value, *iptr;
{
    ROUNDDIR save;

	save = swapround(TOWARDZERO);
	*iptr = rint(value);
	swapround(save);
	return(value - (*iptr));
}
