NAME
modf() — decompose floating-point number
SYNOPSIS
#include <math.h>
double modf(double x, double *iptr);
DESCRIPTION
The
modf()
function breaks the argument
x
into integral and fractional parts, each of which has the same sign as
the argument. It stores the integral part as a
double
in the object pointed to by
iptr.
To use this function, make sure your program includes
<math.h>,
and link in the math library by specifying
-lm
on the compiler or linker command line.
RETURN VALUE
Upon successful completion, the
modf()
function returns the signed fractional part of
x.
If
x
is NaN,
modf()
returns NaN.
If the correct value after rounding would be smaller in magnitude than
MINDOUBLE,
modf()
returns zero.
ERRORS
No errors are defined.
STANDARDS CONFORMANCE
modf(): SVID3, XPG4.2, ANSI C