Reverse factorial

前端 未结 17 1454
南笙
南笙 2020-12-05 03:12

Well, we all know that if N is given it\'s easy to calculate N!. But what about the inverse?

N! is given and you are about to find N - Is that possible ? I\'m curio

17条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 03:41

    In C from my app Advanced Trigonometry Calculator v1.6.8

        double arcfact(double f) {
            double i=1,result=f;
            while((result/(i+1))>=1) {
                result=result/i;
                i++;
            }
            return result;
        }
    

    What you think about that? Works correctly for factorials integers.

提交回复
热议问题