Artificial intelligent assistant

Reversing an equation To be quick and to the point I have an equation as follows: `arrayPos = X + (Y * R) + (Z * (R ^ 2))` The inputs are `X`, `Y`, and `Z` referring to a position in 3 dimensional space. `R` is a constant value representing the maximum size of each dimension. I need to be able to reverse this though, so with `arrayPos` as an input I can find `X`, `Y`, and `Z`. My question is: Is this possible to do and if so, how so? Unfortunately I am not very mathematically minded, and I have spent a fairly long time trying to work it out to no avail. If you feel my question is actually very easy and it comes across as me just being lazy, I can honestly say that is not the case, and I am more than willing to learn if someone here can explain the process to me. I'm not even sure that I've tagged this correctly so again if I've made error with my tags, please feel free to let me know or to edit this question so that it is tagged properly.

This is sometimes possible with some other assumptions. Here's a small example using arithmetic in base 2.

Suppose $R=2^5=32$ and each of $X$, $Y$ and $Z$ is an integer between $0$ and $31$. Then the first five bits (reading from the right) of arrayPos tell you $X$, the next five $Y$ and the last five $Z$. Essentially, you are packing three five bit strings in a 15 bit string.

This example works because $R$ and the unknowns are integers. You might be able to adapt it for your purposes by using fractions with a fixed (large) denominator.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 7957aafde797628b054e325947b05dff