Sorry I am not allowed to comment yet but the function provided by the first answer is not correct, it does perform digit reversal but is missing a composite function in it's denominator which i will post later for the non recurring fractions for which it does work in terms of digit reversal, but for recurring fractions such as 1/3,1/6,1/7 this formula does not work and requires the author to make some more alterations in addition to that composite function.
I can provide a formula that will work for all integers in all number bases, however I am yet to formulate an extension for this to $Q\backslash\,Z$.
The following will work for natural numbers in any base representation (b>1), but there are some pretty serious things i need to consider before moving to non integer fractions and eventually irrationals and resources on the subject are hard for me to find,but if somebody has one that works, please, do tell as it will take me a while on my own:
We start again with the Kronecker delta:
$$\delta \left( x,y \right) =\cases{1&$x=y$\cr 0&$x\neq y$\cr}\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\quad\quad\quad\quad\quad\quad\text{ (1)}$$
Which allows us to express the digits of a number 'a' in base 'b' in a computable integer sequence, in that we already know the exact length of the sequence which is of course the number of digits in total. The expression for this computation is:
$$d_{{n}} \left( a,b \right) =\sum _{k=1}^{ \Bigl\lfloor
{\frac {
\ln \left( a \right) }{\ln \left( b \right) }}\Bigr\rfloor +1} \left(
\delta \left( n,k \right) -b\delta \left( n,k+1 \right) \right)
\Bigl\lfloor{a{b}^{k- {\Bigl\lfloor\frac {\ln \left( a\right)
}{\ln \left( b \right) }\Bigr\rfloor} -1}} \Bigr\rfloor
\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$$
For example,
$a=12345$
in base $b=10:$ will, purely coincidentally of course, evaluate to the arithmetic progression with initial value of 1 and d=1 of length 5:
$$\left\{ d_{{1}} \left( 12345,10 \right) ,d_{{2}} \left( 12345,10
\right) ,d_{{3}} \left( 12345,10 \right) ,d_{{4}} \left( 12345,10
\right) ,d_{{5}} \left( 12345,10 \right) \right\} = \left\{ 1,2,3,4,
5 \right\}
$$
But this(2) will compute the $n^{th}$ digit for the number in any base $b>1$, and thus these values correspond to the coefficients of the b-adic expansion * of the number thus we have as follows:
$$\mathcal{P} \left( a,b \right) =\sum _{n=0}^{ \Bigl\lfloor {
\frac {\ln \left( a \right) }{\ln \left( b \right) }} \Bigr\rfloor +1}d_{
{n}} \left( a,b \right) {b}^{n}\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\text{ (3)}
$$
And from this we can perform digit reversal as follows in any base as far as I can guess, although don't quote me on it because when I noticed this i thought it was too silly to share so i haven't checked other values of b:
$${\frac {\mathcal{P} \left( N,b \right) }{b}}$$
$$\frac{\mathcal{P} \left( 12345,10 \right)}{10} =54321$$
$$\frac{\mathcal{P} \left( 13454345345,10 \right)}{10} =54354345431$$
$$\frac{\mathcal{P} \left( 842622684442,10 \right)}{10} =244486226248$$