[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#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/ISO C | C89; C99 |
POSIX | 1003.2-1992; 1003.1-2001 |