Go to the first, previous, next, last section, table of contents.
#include <math.h> double modf(double x, double *pint);
modf
breaks down x into its integer portion (which it
stores in *pint) and the remaining fractional portion, which it
returns. Both integer and fractional portions have the same sign as
x, except if x is a negative zero, in which case the integer
part is a positive zero.
The fractional portion. If x is Inf
or NaN
, the
return value is zero, the integer portion stored in *pint is the
same as the value of x, and errno
is set to EDOM
.
ANSI, POSIX
Go to the first, previous, next, last section, table of contents.