I recall my teacher mentioned that you can only use the Stirling formula with Maxwell-Boltzmann statistics, not in FD or BE statistics, because of large numbers. How can you then approximate $\ln(x!)$ with FD or BE?
Example approximation with Bose-Einstein statistics
The probability function for Bose-Einstein with $N_i$ particles with $M-1$ walls is
Now my lecture slides for the physics 2062 in Aalto University claims (p.146 here)
$$\ln P \approx \sum_i \left[\left(N_i+M-1\right)\ln\left(N_i+M-1\right)-(N_i+M-1)-N_i \ln(N_i)+N_i\right]-\ln\left(\left(M-1\right)!\right)$$
where the premise is $\ln(n!)\approx n \ln(n)-n$ but a small err in the constant term, more in the comment.
Now Stirling formula is not precise with small amount of particles but the teacher still uses it with both fermions and bosons. I am uneasy about this: more accurate approximation with smaller systems of particles?