斯特林公式是一条用来取n的阶乘的近似值的数学公式。
一般来说,当n很大的时候,n阶乘的计算量十分大,所以斯特林公式十分好用,而且,即使在n很小的时候,斯特林公式的取值已经十分准确。
斯特林公式求N!的位数公式 k= 1.0/2*log10(2*PI*n)+n*log10(n/e);
斯特林公式