We all know about rationality preserving operations. That is, if $r,s\in\mathbb{Q},$ we have that $r+s,r-s,rs,\frac{r}{s(≠0)}\in\mathbb{Q}.$ I was wondering if there are irrationality preserving operations. I know that addition isn't such an operation. To demonstrate this, we can just take $1+\sqrt{2},$ and $2-\sqrt{2}.$ Similarly, subtraction doesn't work either. Multiplication and division don't work either. A few examples would easily demonstrate this. Exponentiation doesn't work either. For this, we can consider $e^{\ln(2)}.$ This leaves me to wonder if there are any operations that preserve irrationality at all. All the operations I considered took two inputs, and I found no such irrationality preserving operations. So, my question is: Are there are irrationality preserving operations, and if there are, what is the minimum number of inputs they need?
Note: I am not considering the "do nothing operation" or operations that take only one input.
There certainly are, but most of them are impossible to describe. One that we can is digit alternation. Given $a,b$, express each in base $10$, using the terminating representation if there are two. Then create the result by alternating the digits of the two numbers each direction from the decimal point, so $f(3.14159,2.71828)=32.1741185298$. This will give a rational output if both inputs are rational and an irrational output if either input is irrational.