Include:
Prototype: double modf(double x, double *intptr);
Returns: the signed fractional portion of x.
See also: frexp, ldexp
The modf function breaks down the floating-point value x into fractional and
integer parts, each of which has the same sign as x. The signed fractional
portion of x is returned. The integer portion is stored as a floating-point
value at intptr.
Return Value
The modf function returns the signed fractional portion of x. There is no
error return.