{'fraction_non_alphanumeric': 0.01991786447638604, 'fraction_numerical': 0.00944558521560575, 'mean_word_length': 5.0735660847880295, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An algorithm for dividing two complex numbers

In this work a rationalized algorithm for calculating the quotient of two complex numbers is presented which reduces the number of underlying real multiplications. The performing of a complex number division using the naive method takes 4 multiplications, 3 additions, 2 squarings and 2 divisions of real numbers while the proposed algorithm can compute the same result in only 3 multiplications ( or multipliers in hardware implementation case), 6 additions, 2 squarings and 2 divisions of real numbers.


Introduction
Mathematical calculations with complex numbers are widely used today for data processing in numerous fields of science and engineering. Perhaps it is easier to list the fields where these numbers are not applicable than those where they are applied.
In complex-valued arithmetic the most time and area consuming operations are multiplication and division of two complex numbers. What is more, the division is even more complicated and expensive than multiplication [1][2][3].
The schoolbook multiplication of complex numbers requires performing 4 real multiplications and 2 real additions, and the schoolbook division of complex numbers requires performing 4 real multiplications, 2 real squarings, 3 real additions and 2 real divisions. In turn, multiplication and division of two ordinary real numbers are also more time consuming operations than addition or subtraction of ordinary real numbers. Since these operations are carried out repeatedly, the total time to the correct implementation of the final algorithm may be unacceptable. It is therefore evident that finding ways, which reduce the number of real multiplications required for performing multiplication and division of complex numbers, is very important task. In 1805 Gauss had discovered a way (so called Gauss's complex multiplication trick) of reducing the number of multiplications to three [4,5]. The Gauss's optimization saves one real multiplication out of four. Unfortunately, no such solutions for division of the complex numbers have been proposed. The aim of the present paper is to suggest an efficient algorithm for this purpose.

The algorithm
Let us suppose that, we need to divide two complex numbers x , r y , i y are real variables, and i is the imaginary unit, satisfying 1 2 − = i . Subscript r means the real part of complex number, and the subscript i means the imaginary part of complex number.
The task is to calculate the quotient defined by the expression (1) with the minimal multiplicative complexity.
A schoolbook method of finding the quotient of two complex numbers can be represented by the following equations: Direct implementation of the calculations in accordance with these equations requires 4 multiplications, 3 additions, 2 squarings and 2 divisions of real numbers. Below we will show how you can reduce the multiplicative complexity of the operation of calculating the quotient of two complex numbers.
Let us introduce the two column vectors: Let also 2 2 i r x x R + = , Now the division of complex numbers can be presented in the matrix-vector multiplication form as The direct multiplication of the vector-matrix product in Eq. (3) requires 4 real multiplications and 2 real additions. We propose a simple way to reduce multiplicative complexity of this operation to 3 real multiplications at the price of 3 more real additions. Proposed way will be quite similar to the Gauss's trick for complex number multiplication.
It is easily verify [6] that the matrix with this structure can be factorized, than the computational procedure for calculate the product of can be represented as follows:

Conclusion
We presented a hardware oriented algorithm for calculating the quotient of two complex numbers. The performing of a complex number division using the naive method takes 4 multiplications, 3 additions, 2 squarings and 2 divisions of real numbers while the proposed algorithm can compute the same result in only 3 multiplications, 6 additions, 2 squarings and 2 divisions of real numbers. So, the use of this algorithm reduces the multiplication complexity of complex number dividing, thus reducing hardware complexity and leading to a high-speed structure suitable for VLSI implementation. In low power VLSI design, optimization must be primarily done at the level of logic gates amount. From this point of view a multiplication requires much more intensive hardware resources than an addition. Moreover, a multiplier occupies much more area and consumes much more power than an adder. This is because the hardware complexity of a multiplier grows quadratically with operand size, while the hardware complexity of an adder increases linearly with operand size. Therefore, the algorithm for division of complex numbers containing as little as possible of real multiplications is preferable.