Possible Duplicate:
Why does modulus division (%
) only work with integers?
This code doesn't work in C and C++ but works in C# and Java:
float x = 3.4f % 1.1f;
double x = 3.4 % 1.1;
Also, division remainder is defined for reals in Python.
What is the reason this operation is not defined for floats and doubles in C and C++?