Which branch of math studies this problem? If we want to calculate the same arithmetic operation on 2 numbers, to say something, the square of $5$ and $7$, we can calculate the square of each one, or we can do this:
$$a= 5*1,000,000+7 = 5,000,007$$
$$a^2=25000070000049$$
Now, ignoring the effort to pack $5$ and $7$ in $a$, and extract $25$ and $49$ from the result, we managed to do the calculations in parallel, with a single calculation. Now I have some questions:
There is a name for this trick? A branch of math?
Where is the practical limit? How many numbers can be calculated in parallel?
What type of functions can benefit from it?
We need in general functions like
$$f(g(x,y))=h(f(x),f(y))$$
where we can unpack $f(x)$ and $f(y)$ from $h(f(x),f(y))$ for all $x$ and $y$ that satisfy certain restrictions
 A: Technically, you haven't reduced the number of computations, as you first needed to calculate $5 \times 10^6 + 7$ before squaring it, and must also find a way to extract the squares from the new number. In general, what you've done is nothing more than $$(10^n x + y)^2 = 10^{2n} x^2 + 10^n (2xy) + y^2.$$
In your example, you chose $n = 6, x = 5, y = 7.$ Assuming that $n$ is sufficiently large, you'll be able to  separate the squares by strings of zeroes. More precisely, let's say that $10^{m-1} \le x \le 10^m$ and $10^{k-1} \le y \le 10^k$. Then $2xy \le 2 \times 10^{km}$, and with $n = km + 1$, we have:
\begin{align*}
(10^n x + y)^2 \mod 10^{2k} &= y^2 \\
\lfloor(10^n x + y)^2/10^{2n}\rfloor &= x^2.
\end{align*}
Returning to you example, we have $k = m = 1$, so $n = 3$ and we obtain
\begin{align*}
25070049 \mod 10^{2} &= 49 \\
\lfloor 25.07005\rfloor &= 25.
\end{align*}
More squares can be included in a similar fashion, for example by taking $(10^n x + 10^p y + z)^2$ and finding appropriate bounds. Larger powers should be possible in a similar way as well. That said, I suspected that this algorithm is significantly more costly than squaring the numbers individually.
A: The name for this would be the analysis of algorithms, with particular reference to parallel algorithms. It would usually be regarded as a field somewhere between pure mathematics and computer science.
Algorithms for arithmetical operations are discussed extensively in the works of Donald Knuth.
