# A Division Algorithm in a Redundant Residue Number System Using Fractions
## 2 An Approximate Method for Determining the Positional Feature of the Modular Number
### Approximate Method  
An analysis of difficult (non-modular) operations has shown that they can be represented exactly or approximately, so the methods for calculating positional characteristics can be divided into two groups:  
* Methods for accurate calculation of positional characteristics. * Methods for the approximate calculation of positional characteristics. The methods for accurate calculation of positional characteristics are discussed in [1; 2; 3]. In this paper, we investigate the approximate method for calculating positional characteristics that can significantly reduce the hardware and time costs due to operations performed on positional codes of reduced capacity. In this regard, there is an issue of using the approximate method when calculating a certain number of non-modular procedures: determining intervals of numbers; number sign; number comparison, in cases where there is no need to know the exact value; and the difference between the numbers. The point of the approximate method for calculating the positional characteristics of modular number is based on employing the relative values of the analyzed numbers to the full range defined by the CRT, which connects the positional number \(a\) with its representation in the remainder (\(\alpha_{1}\), \(\alpha_{2}\),..., \(\alpha_{n}\)), where \(\alpha_{i}\) is the smallest non-negative residues of the number in relation to the modules of the residue number system \(p_{1}\), \(p_{2}\),..., \(p_{n}\) with the following expression:  
\[a\ =\left|\sum\limits_{i=1}^{n}\frac{p_{i}}{p_{i}}|P_{i}^{-1}|_{p_{i}} \alpha_{i}\right|_{p} \tag{4}\]  
where \(p_{i}\) are RNS modules, \(P=\prod\limits_{i=1}^{n}p_{i}\) is the range of RNS, \(P_{i}=\frac{p}{p_{i}}=p_{1}p_{2}\ldots p_{i-1}p_{i+1}\ldots p_{n}\), and \(|P_{i}^{-1}|_{p_{i}}\) is a multiplicative inversion of \(P_{i}\) modulo \(p_{i}\). If we divide the left and right parts of Expression (4) by the constant \(P\), corresponding to the range of numbers, we will get the approximate value  
\[\left|\frac{a}{P}\right|_{1}=\left|\sum\limits_{i=1}^{n}\frac{|P_{i}^{-1}|_{p_ {i}}}{p_{i}}\alpha_{i}\right|_{1}\approx\left|\sum\limits_{i=1}^{n}k_{i}\alpha _{i}\right|_{1}, \tag{5}\]  
where \(|\star|_{1}\) denotes the fraction of \(\ast\) (or Modulo 1 operation) [24], \(k_{i}=\frac{|P_{i}^{-1}|_{p_{i}}}{p_{i}}\) are constants of the chosen system, and \(\alpha_{i}\) are positions of the number represented in the RNS in modules \(p_{i}\), where \(i=1,\ 2,\ \ldots,\ n\), and the value of the Expression (5) will be in the range \([0,\ 1)\). The result of the sum shall be found after summation and discarding the integer part while maintaining the fractional part of the sum. The fractional value \(F(a\ )=\left|\frac{a}{P}\right|_{1}\in[0,\ 1)\) contains information both on the magnitude of the number and on its sign. If \(\left|\frac{a}{P}\right|_{1}\in[0,\ \frac{1}{2})\), then the number \(a\) is positive and \(F(a)\) is equal to the number of \(a\), divided by \(P\). Otherwise, \(a\) is a negative number, and \(1-F(a)\) indicates a relative value. Rounding \(F(a)\) to \(2^{-t}\) bits will be denoted as \(\left[F(a\ )\right]_{2^{-t}}\). The exact value of \(F(a)\) is determined by inequalities \(\left[F(a\ )\right]_{2^{-t}}<F(a\ )<\left[F(a\ )\right]_{2^{-t}}+2^{-t}\). The integer part, obtained through summing the constants \(k_{i}\), is a rank number; that is, a non-positional feature that shows how many times the range of the system \(P\) was surpassed while passing from the number representation in the residue number system to its positional representation. If necessary, the rank can be determined directly through the operation of the summation the constants \(k_{i}\). The fractional part can also be written as \(A\)mod1 because \(A=\left\lfloor A\right\rfloor+A\)mod1. The number of positions in the fractional part of the number is determined by the maximum potential difference between the adjacent numbers.