Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - modf http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   modf

   Usage
   #include <math.h>
   double modf(double x,double *ptr);

   Description
   modf  returns  the signed fractional value of x. The  signed  integral
   part of x is stored at the location pointed to by ptr.

   Example
   #include <math.h>
   #include <stdio.h>
   main()
   {
   double x,y,n;
        x = -41.56789;
        y = modf(x,&n);
        printf("modf(%f) = fractional: %f and integer: %f",x,y,n);
   }

   Return Value
   The function modf returns the signed fractional portion of x.


See Also: frexp ldexp

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson