may be applied at the end of the computation, or, during the computation, for avoiding overflow of hardware operations. However, operations such as magnitude comparison, sign computation, overflow detection, scaling, and division are difficult to perform in a residue number system. Comparison If two integers are equal, then all their residues are equal. Conversely, if all residues are equal, then the two integers are equal, or their differences is a multiple of . It follows that testing equality is easy. At the opposite, testing inequalities () is difficult and, usually, requires to convert integers to the standard representation. As a consequence, this representation of numbers is not suitable for algorithms using inequality tests, such Euclidean division and Euclidean algorithm. Division Division in residue numeral systems is problematic. On the other hand, if is coprime with (that is ) then can be easily calculated by where is multiplicative inverse of modulo , and is multiplicative inverse of modulo . Applications RNS have applications in the field of digital computer arithmetic. By decomposing in this a large integer into a set of smaller integers, a large calculation can be performed as a series of smaller calculations that can be performed independently and in parallel. See also Covering system Reduced residue system References Further reading (viii+418+6 pages) Chervyakov, N. I.; Molahosseini, A. S.; Lyakhov, P. A. (2017). Residue-to-binary conversion for general moduli sets based on approximate Chinese remainder theorem. International Journal of Computer Mathematics, 94:9, 1833-1849, doi: 10.1080/00207160.2016.1247439. Chervyakov, N. I.; Lyakhov, P. A.; Deryabin, M. A. (2020). Residue Number System-Based Solution for Reducing the Hardware Cost of a Convolutional Neural Network. Neurocomputing, 407, 439-453, doi: 10.1016/j.neucom.2020.04.018. (1+7 pages) (296 pages) (351 pages) (389 pages) Division algorithms Isupov, Konstantin (2021). "High-Performance Computation in Residue Number System Using Floating-Point Arithmetic". Computation. 9 (2): 9. doi:10.3390/computation9020009. ISSN 2079-3197. Modular arithmetic Computer arithmetic