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++ 3.0r4 - <b>modf</b> 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);

   ANSI

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>
   #include <stdlib.h>

   int main()

   {
       double x,y,n;
       x = -41.56789;
       y = modf(x,&n);
       printf("modf(%f) = fractional: %f\n and integer: %f"
           ,x,y,n);
       return EXIT_SUCCESS;
   }

Return Value

   The function modf returns the signed fractional portion of x.

See Also

   frexp, ldexp



See Also: frexp ldexp

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