TITLE: Is it possible to combine two integers in such a way that you can always take them apart later?
QUESTION [12 upvotes]: Given two integers $n$ and $m$ (assuming for both $0 < n < 1000000$) is there some function $f$ so that if I know $f(n, m) = x$ I can determine $n$ and $m$, given $x$? Order is important, so $f(n, m) \not= f(m,n)$ (unless $n=m$).

REPLY [2 votes]: f(m,n) = m +(1/n)
If there  are numbers to the right of the decimal,
m =number to the left of decimal.
n = the reciprocal of the numbers to the right of the decimal
example
f(m,n) =10.5 then m =10, n=1/(0.5) =2  
If there are no numbers to right of the decimal [f(m,n) is itself an integer]
 then m = f(m,n) -1,
 n =1
example
f(m,n) =20 then m=19, n =1