Hi Experts,
I need some help with modulus calculation of decimal numbers. I understand modulus is actually the remainder when we divide two numbers. I can easily calculate modulus for integers but I need some help with decimals.
I don't understand why the result of 8.75 % .5 = .25
According to me 8.75 % .5 should be 0 because .5 divides 8.75 perfectly and we get 17.5 as the quotient and 0 remainder.
17.5 x .5 = 8.75
Can someone please help?
I need some help with modulus calculation of decimal numbers. I understand modulus is actually the remainder when we divide two numbers. I can easily calculate modulus for integers but I need some help with decimals.
I don't understand why the result of 8.75 % .5 = .25
According to me 8.75 % .5 should be 0 because .5 divides 8.75 perfectly and we get 17.5 as the quotient and 0 remainder.
17.5 x .5 = 8.75
Can someone please help?