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():


		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. Both comments and pings are currently closed. Tweet This! Tweet This! or use to share this post with others.

Comments are closed.