modf() and modff()

Syntax
  #include <math.h>

  
  double modf(double x, double *i);

  
  float  modff(float x, float *i);

  
Description

modf() splits the floating-point number x into an integral part (returned in *i) and a fractional part. Both parts have the same sign as x.

Return

The fractional part of x

See also

floor() and floorf()

fmod() and fmodf()

frexp() and frexpf()

ldexp() and ldexpf()