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 - fmod http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   fmod

   Usage
   #include <math.h>
   double fmod (double x,double y);

   Description
   fmod is used to obtain the floating point remainder of two numbers. It
   returns x if x is zero, or the number F with the same sign as x,  such
   that x = L * y + F for some integer L, and |F| < |Y|.

   Example
   #include <stdio.h>
   #include <math.h>
   main()
   {
   double x, y, d;
        x = 5.0;
        y = 3.0;
        d = fmod(x, y);
        printf("fmod (%.2f, %.2f) is %f",x,y,d);
   }

   Return Value
   fmod returns the floating point remainder.


See Also: ceil floor modf

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