Synopsis
#include <math.h>
double modf(double x, double *iptr);
Description

modf breaks x into integral and fractional parts, each of which has the same type and sign as x.

The integral part (in floating-point format) is stored in the object pointed to by iptr and modf returns the signed fractional part of x.

Portability

modf conforms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).