cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float modff (float x, /*@out@*/ float *iptr); extern double modf (double x, /*@out@*/ double *iptr); extern long double modfl (long double x, /*@out@*/ long double *iptr); extern __float80 modfw (__float80 x, /*@out@*/ __float80 *iptr); extern __float128 modfq (__float128 x, /*@out@*/ __float128 *iptr); extern long_long_double modfll (long_long_double x, /*@out@*/ long_long_double *iptr); extern decimal_float modfdf (decimal_float x, /*@out@*/ decimal_float *iptr); extern decimal_double modfd (decimal_double x, /*@out@*/ decimal_double *iptr); extern decimal_long_double modfdl (decimal_long_double x, /*@out@*/ decimal_long_double *iptr); extern decimal_long_long_double modfdll (decimal_long_long_double x, /*@out@*/ decimal_long_long_double *iptr);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
The splitting is always exact, so that the original number can be recovered by (exact) addition of the integral and fractional parts.
If the argument is +Infinity or -Infinity, the fractional part returned is a zero of the same sign as the argument, and any integral part that is stored is the argument.
If the argument is a NaN, both the integral part (if stored) and the returned fractional part are quiet NaNs.