Sunday, 28 April 2019

Calculating Modular Arithmetic in the below way

How do I calculate:





$a \pmod c + b \pmod c$




using the modular arithmetic:




$(a+b) \pmod c = (a \pmod c + b \pmod c)\pmod c$





For example, assuming that $a=14, b=17$ and $c=5$;



$(a+b) \pmod c = (a \pmod c + b \pmod c) \pmod c$



$31 \pmod 5 = ( 4 + 2 ) \pmod 5$



I just want $6 (4+2)$ to be the output.



One way to calculate it is to perform $(a \pmod c + b \pmod c).$




But how do I calculate that value without performing in the above mentioned way but by using $(a+b) \pmod c$ ?

No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

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