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>fmod</b> 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);

   ANSI

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

   int 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 EXIT_SUCCESS;
   }

Return Value

   fmod returns the floating point remainder.

See Also

   ceil, floor, modf



See Also: ceil floor modf

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