Im using the remquo function in the cmath library as follows:

int quotient;
double a = remquo (10.3, 4.5, &quotient);

This gives the correct remainder (a = 1.3) and quotient (quotient = 2).

Infact about 50% of the answers are right when I play around, however, trying something like:

int quotient;
double a = remquo (2.25, 1.5, &quotient);

yields an incorrect quotient of 2 and remainder of 0.

I do think this has something to do with float arithmetic. I recall tinkering with the float number 0.500 and that the CPU actually saves it as 0.50000000000000231. However if my suspicion of float arithmetic as the suspect is correct, I do not understand why a tenth decimal would make such a drastic difference as changing the quotient result.

Please advise.