Check out example codes for "how to modulo decimal c". It will help you in understanding the concepts better.

Code Example 1

#include <math.h>

int main(void)
{
	// use the fmod() function
 	printf("%f", fmod(0.5, 2.0));
}

Learn ReactJs, React Native from akashmittal.com