#include <math.h>float modff(float num, float *i);double modf(double num, double *i); long double modfl(long double num, long double *i);
modff( ) and modfl( ) were added by C99.
The modf( ) family of functions decomposes num into its integer and fractional parts. The functions return the fractional portion and place the integer part in the variable pointed to by i.
Related functions are frexp( ) and ldexp( ).