Open Question: how to find modulus of negative numbers?


x mod n where x<0

x mod n = (x + kn) mod n .. [Choosing k so kn > |x|]

so -17 mod 5 … [ Choose k=4 as 4*5 > |-17| ]
= (-17 + 4*5) mod 5
= 3 mod 5
= 3

View the original article here

Open Question: can factors be negative . if yes then while factorising positive numbers why dont we include their -ve factor.?


Any negative number x is equivalent to the product of -1 and the positive number -x.
The only products obtainable by powers of the -1 factors are -1 and 1.

This means that the negative factors aren’t really separate information. We factor numbers because their factorizations are useful; information about negative factors would be completely redundant and therefore not useful.

View the original article here