modf

Breaks the argument value into integral and fractional parts.

Library:LibC
Classification:ANSI
Service:Math

Syntax

  #include <math.h> 
   
  double modf (
     double    value,   
     double   *iptr);
  

Parameters

value

(IN) Specifies the value to be broken into integral and fractional parts.

iptr

(OUT) Points to the object into which the integral part is stored as a double.

Return Values

Returns the signed fractional part of value.

Remarks

The modf function breaks the argument value 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.

See Also