Decompose a floating-point number.
gentype modf(gentype x,
gentype *iptr)
Decompose a floating-point number.
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 in the object pointed to by iptr
.
modf
behaves as though implemented by:
gentype modf ( gentype value, gentype *iptr ) { *iptr = trunc( value ); return copysign( isinf( value ) ? 0.0 : value - *iptr, value ); }