Find the floating point remainder (modulo) of the division.
The modulo operation it's a way to determine the remainder of a division operation. Modulo operation returns the whole number remainder instead of just returning the result of the division.
- Choose the initial number (dividend)
- Choose the divisor
- Divide one number by the other and drop the number after the dot (fractional part)
- Multiply the divisor by the result after previous division
- Subtract this number from initial number and result of it's result of the modulo operation
Here is example:
- Initial number - 25
- Divisor - 7
- 25 / 7 = 3.5714
- 7 * 3 = 21
- 25 - 21 = 4
So, result of 25 mod 7 operation is equal to 4.
Let's take 10 as dividend.