Encoding 2 numbers into 1 Say we have two integers, $a$ and $b$. I need a way to combine these numbers into one unique number $x$, such that they can both be recovered from $x$ and no other numbers can be recovered from $x$
There are plenty of ways to do this, but the problem is that I am using this for programming and I only have the following operators:
$+$ $-$ $\times$ $\div$ $a^x$ $\sqrt{}$
I also have sin and cos but I doubt those will be needed. 
Is it possible to encode and decode $a$ and $b$ using just these operators?

You didn't specify whether $x$ needed to be an integer. In order to avoid massive numbers in exponentation, we could take
$$x=a+\frac{1}{b}$$
Since $a,b$ are integers, $a$ will just be the integer part of $x$ and $1/b$ will be the reciprocal part, which you should be able to computationally reciprocate and round to the nearest integer (again, if $b$ is too big this may lead to floating point errors but this should be much better than calculating $2^a$ or similar).
