Try to check manualy the value fmod(1,0.00024414) ? Maybe function fmod returns 0 if the true reminder is less than 0.00001. Sorry for multiply edits

Ok, I made program fmod with following code:
#include <stdio.h>
#include <math.h>
int main ()
{
float a, c;
a = 1;
c = 0.00024414;
printf("Remainder of %f %f is %lf\n", a, c, fmod(a,c));
return(0);
}
which returned :
Remainder of 1.000000 0.000244 is 0.000003
Then realized that in my coins code I was using "double" instead of "float" to define the difficulty. So I proceeded to change my fmod code to:
#include <stdio.h>
#include <math.h>
int main ()
{
double a, c;
a = 1;
c = 0.00024414;
printf("Remainder of %f %f is %lf\n", a, c, fmod(a,c));
return(0);
}
Which still gave me:
Remainder of 1.000000 0.000244 is 0.000003
Still don't understand why my coins code thinks that 0.000003 doesn't fall between 1 and 0.0000001...
