C Reference function fmod()
Usage of fmod():
double fmod(double x, double y);
Return value:
There is no range limit on the return value. If y is zero,
then either a range error will occur or the function will return zero (this can differ per implementation.)
Source code example of fmod():
#include<stdio.h>
#include<math.h>
main()
{
printf ("fmod of 2.5 / 2 is %lf\n", fmod(2.5,2));
return 0;
}
Output of the fmod example program above:
fmod of 2.5 / 2 is 0.500000
This entry was posted in C Reference math.h Functions.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Tweet This! or use
to share this post with others.