Divide floating-point number into integer and decimal
double modf(double val, double *ipart);
Returns a decimal part. The sign of the result is the same as the sign of val.
This function divides val of double type into integer and decimal parts, and stores the integer part in *ipart. Rounding is not performed. It is guaranteed that the sum of the integer part and decimal part accurately coincides with val. For example, where realpart = modff (val, &intpart), "realpart + intpartt" coincides with val.