Does Modulo Work with Doubles?

Does Modulo Work with Doubles?

Double Modulus Operator
If either or both operands of the mod operator have type double, then evaluating it produces the remainder. ... The remainder is computed by assuming the division yields an integer result, with the rest being a remainder.

Can you use modulus with double C?

The modulus is basically finding the remainder. ... For this, we can use the remainder() function in C. The remainder() function is used to compute the floating point remainder of numerator/denominator.

Does modulo work with float?

Answer. Yes, the Python modulo operator will work with floating point numbers.

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.