I need to solve the following equation for $m$:
$$ \frac{(2n-m)!}{(n-m)!} = c $$
where $m$ and $n$ are natural numbers in the order of 10 with $n \ge m$ and $c$ is a real-valued constant (edit: it's a natural number actually, HT @Kaind). Any chance this can be solved/approximated analytically?
The goal being to get an approximation of $m$ from the equation $$\frac{(2n-m)!}{(n-m)!} = c$$ in the real domain, I shall convert the problem to the gamma function and logarithms (just as @NN2 did); remember that the log gamma function is available is most environments. So , the problem is to solve for $m$ the equation $$\log \left(\frac{\Gamma (2 n+1-m)}{\Gamma (n+1-m)}\right)=k \qquad \text{with} \qquad k=\log(c)\tag 1$$ The fact that $0 \leq m \leq n$ implies that the solution exists only if $$\log(n!) \leq k \leq \log \left(\frac{(2 n)!}{n!}\right)$$
To stay as simple as possible, in a first step, we shall assume that the lhs of $(1)$ can write as $$\log \left(\frac{\Gamma (2 n+1-m)}{\Gamma (n+1-m)}\right)\sim\frac {\alpha+\beta \,m}{1+\gamma\,m}$$ and the parameters will be defined using three specific points, namely $m=0$, $m=\frac n 2$ and $m=n$.
This gives $$\alpha =\log \left(\frac{\Gamma (2 n+1)}{\Gamma (n+1)}\right)$$ $$\gamma=-\frac{\color{red}{\alpha} +\log (\Gamma (n+1))-2 \log \left(\frac{\Gamma \left(\frac{3 n}{2}+1\right)}{\Gamma \left(\frac{n}{2}+1\right)}\right)}{n \left(\log (\Gamma (n+1))-\log \left(\frac{\Gamma \left(\frac{3 n}{2}+1\right)}{\Gamma \left(\frac{n}{2}+1\right)}\right)\right)}$$ $$\beta=\frac{(\color{red}{\gamma} n+1) \log (\Gamma (n+1))-\color{red}{\alpha} }{n}$$ The approximation is then $$m_0=\frac{\alpha -k}{\gamma k-\beta }$$ Now, we can polish the root making for example one single iteration of Newton method giving $$m_1=m_0- \frac{\log \left(\frac{\Gamma (2 n+1-m_0)}{\Gamma (n+1-m_0)}\right)-k} {\psi (n+1-m_0)-\psi (2 n+1-m_0) }$$
For a test, I shall use $n=20$ and $45 \leq k \leq 67$. The results are given below.
$$\left( \begin{array}{cccc} k & m_0 & m_1 & \text{exact} \\ 45 & 18.9257 & 19.1467 & 19.1414 \\ 46 & 18.4909 & 18.7665 & 18.7595 \\ 47 & 18.0369 & 18.3531 & 18.3451 \\ 48 & 17.5625 & 17.9063 & 17.8979 \\ 49 & 17.0665 & 17.4253 & 17.4171 \\ 50 & 16.5471 & 16.9097 & 16.9020 \\ 51 & 16.0027 & 16.3583 & 16.3516 \\ 52 & 15.4315 & 15.7703 & 15.7647 \\ 53 & 14.8315 & 15.1445 & 15.1401 \\ 54 & 14.2004 & 14.4796 & 14.4763 \\ 55 & 13.5357 & 13.7740 & 13.7718 \\ 56 & 12.8347 & 13.0263 & 13.0249 \\ 57 & 12.0942 & 12.2346 & 12.2339 \\ 58 & 11.3110 & 11.3971 & 11.3968 \\ 59 & 10.4812 & 10.5117 & 10.5117 \\ 60 & 9.60044 & 9.57631 & 9.57630 \\ 61 & 8.66393 & 8.58850 & 8.58835 \\ 62 & 7.66621 & 7.54579 & 7.54542 \\ 63 & 6.60106 & 6.44550 & 6.44493 \\ 64 & 5.46142 & 5.28484 & 5.28414 \\ 65 & 4.23917 & 4.06086 & 4.06018 \\ 66 & 2.92502 & 2.77048 & 2.77001 \\ 67 & 1.50818 & 1.41059 & 1.41041 \end{array} \right)$$ This looks to be more than decent inspite of the extreme simplicity of the model used for the generation of $m_0$.
Edit (too long for the comment section)
Concerning your code, I should not use log(gamma(x)) but loggamma(x) (available in Python and much more efficient since you work with huge numbers); you sill need to use $\log \left(\frac{x}{y}\right)=\log(x)-\log(y)$ for each ratio of gamma functions.
I don't see any mistake in your code. However, I found one in my answer (a minus sign was missing in front of the expression of $\gamma$. Sorry for that).
To check the results of your test case, you should have $$\alpha=67.985023254003910399$$ $$\beta=-2.3627320266334409125$$ $$\gamma=-0.025516616439785586046$$ $$m_0=11.87544422099728158 \quad \text{instead of} \qquad 12$$ $$m_1=12.00052654314102290$$
I still work this interesting problem. If anything interesting, I shall post here.
Update
Trying the above for $n=123\sqrt \pi$ and $c=e^{1234}$ gives $m_0=35.5230$ and $m_1=33.3622$ while the solution is $m=33.3534$