Possible Duplicate:
How to make a modulo operation in objective-c / cocoa touch?
Can somebody explain to me why here the value of "myModValue" is 1.73472e-18 but when x would be 0.1 or 0.4 it's correctly 0? Is there a better way to get the modulo-value of two doubles?
double x = 0.3;
double y = 0.1;
double myModValue = fmod(x, y);
Thanks Michael
EDIT: Tried the above code hardcoded (so not with the values of my project-variables) and the result is 0.1 I don't know why...