Saturday, 18 February 2017

modular arithmetic - Multiplication of floating numbers to a modulus

As we all know, the integers follow the following identity :



(ABC)modM=((AB)modMC)modM



But it does not work for real numbers having fractional part. For example:




1.71.71.7=0.913mod2.0



whereas,



1.71.7=0.89mod2.0



and, 0.891.7=1.513mod2.0



We see the two results are unequal. So, does the modular identities do not work with real numbers? If yes, is there any way I could do multiplication of real numbers to get the expected result?

No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find limh0sin(ha)h without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...